Class AbstractCoordinatorTestCase

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

public class AbstractCoordinatorTestCase extends ESTestCase
  • Field Details

    • nodeEnvironments

      protected final List<NodeEnvironment> nodeEnvironments
    • openPersistedStates

      protected final Set<CoordinationState.PersistedState> openPersistedStates
    • nextNodeIndex

      protected final AtomicInteger nextNodeIndex
    • CLUSTER_STATE_UPDATE_NUMBER_OF_DELAYS

      public static final int CLUSTER_STATE_UPDATE_NUMBER_OF_DELAYS
      See Also:
    • 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
    • ALL_ROLES_EXCEPT_VOTING_ONLY

      protected static final Set<DiscoveryNodeRole> ALL_ROLES_EXCEPT_VOTING_ONLY
  • 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(Setting<org.elasticsearch.core.TimeValue> setting)
    • defaultInt

      protected static int defaultInt(Setting<Integer> setting)
    • getTransportInterceptor

      protected TransportInterceptor getTransportInterceptor(DiscoveryNode localNode, ThreadPool threadPool)
    • createCoordinatorStrategy

      protected AbstractCoordinatorTestCase.CoordinatorStrategy createCoordinatorStrategy()
    • createDiscoveryNode

      protected DiscoveryNode createDiscoveryNode(int nodeIndex, boolean masterEligible)
    • setValue

      public ClusterState setValue(ClusterState clusterState, int key, long value)
    • value

      public long value(ClusterState clusterState)
    • value

      public long value(ClusterState clusterState, int key)
    • assertStateEquals

      public void assertStateEquals(ClusterState clusterState1, ClusterState clusterState2)
    • keySet

      public Set<Integer> keySet(ClusterState clusterState)
    • testRegisterSpecConsistency

      public void testRegisterSpecConsistency()