Class ParameterizedStaticSettingsOpenSearchIntegTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.opensearch.test.OpenSearchTestCase
org.opensearch.test.OpenSearchIntegTestCase
org.opensearch.test.ParameterizedStaticSettingsOpenSearchIntegTestCase
Direct Known Subclasses:
AbstractNumericTestCase, AbstractSnapshotIntegTestCase, AbstractTermsTestCase

public abstract class ParameterizedStaticSettingsOpenSearchIntegTestCase extends OpenSearchIntegTestCase
Base class for running the tests with parameterization with static settings: the cluster will be pre-created with the settings at startup, the method hasSameParametersAs(ParameterizedOpenSearchIntegTestCase) is being used by the test scaffolding to detect when the test suite is instantiated with the new parameters and the test cluster has to be recreated.

Here is the simple illustration on of the execution flow per parameters combination:

  • suite scope: create cluster -> for each test method { run test method } -> shutdown cluster
  • test scope: for each test method { create cluster -> run test method -> shutdown cluster }
  • Field Details

    • REMOTE_STORE_REPOSITORY_NAME

      protected static final String REMOTE_STORE_REPOSITORY_NAME
      See Also:
    • replicationSettings

      public static final List<Object[]> replicationSettings
    • remoteStoreSettings

      public static final List<Object[]> remoteStoreSettings
    • settings

      protected final org.opensearch.common.settings.Settings settings
  • Constructor Details

    • ParameterizedStaticSettingsOpenSearchIntegTestCase

      public ParameterizedStaticSettingsOpenSearchIntegTestCase(org.opensearch.common.settings.Settings nodeSettings)
  • Method Details

    • nodeSettings

      protected org.opensearch.common.settings.Settings nodeSettings(int nodeOrdinal)
      Description copied from class: OpenSearchIntegTestCase
      This method is used to obtain settings for the Nth node in the cluster. Nodes in this cluster are associated with an ordinal number such that nodes can be started with specific configurations. This method might be called multiple times with the same ordinal and is expected to return the same value for each invocation. In other words subclasses must ensure this method is idempotent.
      Overrides:
      nodeSettings in class OpenSearchIntegTestCase
    • indexRandomForConcurrentSearch

      public void indexRandomForConcurrentSearch(String... indices) throws InterruptedException
      Throws:
      InterruptedException