Class AbstractCoordinatorTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.opensearch.test.OpenSearchTestCase
org.opensearch.cluster.coordination.AbstractCoordinatorTestCase

public class AbstractCoordinatorTestCase extends OpenSearchTestCase
  • Field Details

    • nodeEnvironments

      protected final List<org.opensearch.env.NodeEnvironment> nodeEnvironments
    • openPersistedStates

      protected final Set<org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.MockPersistedState> openPersistedStates
    • nextNodeIndex

      protected final AtomicInteger nextNodeIndex
    • DEFAULT_CLUSTER_STATE_UPDATE_DELAY

      public static final long DEFAULT_CLUSTER_STATE_UPDATE_DELAY
      See Also:
    • DEFAULT_ELECTION_DELAY

      public static final long DEFAULT_ELECTION_DELAY
    • DEFAULT_STABILISATION_TIME

      public static final long DEFAULT_STABILISATION_TIME
    • NODE_ID_LOG_CONTEXT_KEY

      public static final String NODE_ID_LOG_CONTEXT_KEY
      See Also:
  • Constructor Details

    • AbstractCoordinatorTestCase

      public AbstractCoordinatorTestCase()
  • Method Details

    • resetNodeIndexBeforeEachTest

      public void resetNodeIndexBeforeEachTest()
    • closeNodeEnvironmentsAfterEachTest

      public void closeNodeEnvironmentsAfterEachTest()
    • assertAllPersistedStatesClosed

      public void assertAllPersistedStatesClosed()
    • resetPortCounterBeforeEachTest

      public void resetPortCounterBeforeEachTest()
    • testRepeatableTests

      public void testRepeatableTests() throws Exception
      Throws:
      Exception
    • defaultMillis

      protected static long defaultMillis(org.opensearch.common.settings.Setting<org.opensearch.common.unit.TimeValue> setting)
    • defaultInt

      protected static int defaultInt(org.opensearch.common.settings.Setting<Integer> setting)
    • getTransportInterceptor

      protected org.opensearch.transport.TransportInterceptor getTransportInterceptor(org.opensearch.cluster.node.DiscoveryNode localNode, org.opensearch.threadpool.ThreadPool threadPool)
    • getElectionStrategy

      protected org.opensearch.cluster.coordination.ElectionStrategy getElectionStrategy()
    • getNodeIdForLogContext

      protected static String getNodeIdForLogContext(org.opensearch.cluster.node.DiscoveryNode node)
    • onNodeLog

      public static Runnable onNodeLog(org.opensearch.cluster.node.DiscoveryNode node, Runnable runnable)
    • createTestNodeConnectionsService

      public static org.opensearch.cluster.NodeConnectionsService createTestNodeConnectionsService(org.opensearch.common.settings.Settings settings, org.opensearch.threadpool.ThreadPool threadPool, org.opensearch.transport.TransportService transportService)
    • createDiscoveryNode

      protected org.opensearch.cluster.node.DiscoveryNode createDiscoveryNode(int nodeIndex, boolean clusterManagerEligible)
    • setValue

      public org.opensearch.cluster.ClusterState setValue(org.opensearch.cluster.ClusterState clusterState, int key, long value)
    • value

      public long value(org.opensearch.cluster.ClusterState clusterState)
    • value

      public long value(org.opensearch.cluster.ClusterState clusterState, int key)
    • assertStateEquals

      public void assertStateEquals(org.opensearch.cluster.ClusterState clusterState1, org.opensearch.cluster.ClusterState clusterState2)
    • keySet

      public Set<Integer> keySet(org.opensearch.cluster.ClusterState clusterState)
    • testRegisterSpecConsistency

      public void testRegisterSpecConsistency()