Class AbstractCoordinatorTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase

public class AbstractCoordinatorTestCase
extends ESTestCase
  • Field Details

    • nodeEnvironments

      protected final java.util.List<org.elasticsearch.env.NodeEnvironment> nodeEnvironments
    • openPersistedStates

      protected final java.util.Set<org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.MockPersistedState> openPersistedStates
    • nextNodeIndex

      protected final java.util.concurrent.atomic.AtomicInteger nextNodeIndex
    • DEFAULT_CLUSTER_STATE_UPDATE_DELAY

      public static final long DEFAULT_CLUSTER_STATE_UPDATE_DELAY
      See Also:
      Constant Field Values
    • 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 java.lang.String NODE_ID_LOG_CONTEXT_KEY
      See Also:
      Constant Field Values
  • 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 java.lang.Exception
      Throws:
      java.lang.Exception
    • defaultMillis

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

      protected static int defaultInt​(org.elasticsearch.common.settings.Setting<java.lang.Integer> setting)
    • getTransportInterceptor

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

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

      protected static java.lang.String getNodeIdForLogContext​(org.elasticsearch.cluster.node.DiscoveryNode node)
    • onNodeLog

      public static java.lang.Runnable onNodeLog​(org.elasticsearch.cluster.node.DiscoveryNode node, java.lang.Runnable runnable)
    • createDiscoveryNode

      protected org.elasticsearch.cluster.node.DiscoveryNode createDiscoveryNode​(int nodeIndex, boolean masterEligible)
    • setValue

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

      public long value​(org.elasticsearch.cluster.ClusterState clusterState)
    • value

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

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

      public java.util.Set<java.lang.Integer> keySet​(org.elasticsearch.cluster.ClusterState clusterState)
    • testRegisterSpecConsistency

      public void testRegisterSpecConsistency()