Class AbstractFullClusterRestartTestCase


public abstract class AbstractFullClusterRestartTestCase extends ESRestTestCase
  • Constructor Details

    • AbstractFullClusterRestartTestCase

      public AbstractFullClusterRestartTestCase()
  • Method Details

    • init

      public void init() throws IOException
      Throws:
      IOException
    • isRunningAgainstOldCluster

      public static boolean isRunningAgainstOldCluster()
    • isRunningAgainstAncientCluster

      protected final boolean isRunningAgainstAncientCluster()
      Returns:
      true if test is running against an old cluster before that last major, in this case when System.getProperty("tests.is_old_cluster" == true) and oldClusterVersion is before Version.V_7_0_0
    • getOldClusterVersion

      public static Version getOldClusterVersion()
    • preserveIndicesUponCompletion

      protected boolean preserveIndicesUponCompletion()
      Description copied from class: ESRestTestCase
      Returns whether to preserve the indices created during this test on completion of this test. Defaults to false. Override this method if indices should be preserved after the test, with the assumption that some other process or test will clean up the indices afterward. This is useful if the data directory and indices need to be preserved between test runs (for example, when testing rolling upgrades).
      Overrides:
      preserveIndicesUponCompletion in class ESRestTestCase
    • preserveSnapshotsUponCompletion

      protected boolean preserveSnapshotsUponCompletion()
      Description copied from class: ESRestTestCase
      Returns whether to preserve the snapshots in repositories on completion of this test. Defaults to not preserving snapshots. Only works for fs repositories.
      Overrides:
      preserveSnapshotsUponCompletion in class ESRestTestCase
    • preserveReposUponCompletion

      protected boolean preserveReposUponCompletion()
      Description copied from class: ESRestTestCase
      Returns whether to preserve the repositories on completion of this test. Defaults to not preserving repos. See also ESRestTestCase.preserveSnapshotsUponCompletion().
      Overrides:
      preserveReposUponCompletion in class ESRestTestCase
    • preserveTemplatesUponCompletion

      protected boolean preserveTemplatesUponCompletion()
      Description copied from class: ESRestTestCase
      Controls whether or not to preserve templates upon completion of this test. The default implementation is to delete not preserve templates.
      Overrides:
      preserveTemplatesUponCompletion in class ESRestTestCase
      Returns:
      whether or not to preserve templates
    • preserveClusterSettings

      protected boolean preserveClusterSettings()
      Description copied from class: ESRestTestCase
      Controls whether or not to preserve cluster settings upon completion of the test. The default implementation is to remove all cluster settings.
      Overrides:
      preserveClusterSettings in class ESRestTestCase
      Returns:
      true if cluster settings should be preserved and otherwise false
    • preserveRollupJobsUponCompletion

      protected boolean preserveRollupJobsUponCompletion()
      Description copied from class: ESRestTestCase
      Returns whether to preserve the rollup jobs of this test. Defaults to not preserving them. Only runs at all if xpack is installed on the cluster being tested.
      Overrides:
      preserveRollupJobsUponCompletion in class ESRestTestCase
    • preserveILMPoliciesUponCompletion

      protected boolean preserveILMPoliciesUponCompletion()
      Description copied from class: ESRestTestCase
      Returns whether to preserve ILM Policies of this test. Defaults to not preserving them. Only runs at all if xpack is installed on the cluster being tested.
      Overrides:
      preserveILMPoliciesUponCompletion in class ESRestTestCase
    • preserveSLMPoliciesUponCompletion

      protected boolean preserveSLMPoliciesUponCompletion()
      Description copied from class: ESRestTestCase
      Returns whether to preserve SLM Policies of this test. Defaults to not preserving them. Only runs at all if xpack is installed on the cluster being tested.
      Overrides:
      preserveSLMPoliciesUponCompletion in class ESRestTestCase
    • preserveDataStreamsUponCompletion

      protected boolean preserveDataStreamsUponCompletion()
      Description copied from class: ESRestTestCase
      Determines if data streams are preserved upon completion of this test. The default implementation wipes data streams.
      Overrides:
      preserveDataStreamsUponCompletion in class ESRestTestCase
      Returns:
      whether or not to preserve data streams
    • assertNoFailures

      protected static void assertNoFailures(Map<?,?> response)
    • assertTotalHits

      protected void assertTotalHits(int expectedTotalHits, Map<?,?> response)
    • extractTotalHits

      protected static int extractTotalHits(Map<?,?> response)