Class AbstractCoordinatorTestCase.Cluster
java.lang.Object
org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable
- Enclosing class:
AbstractCoordinatorTestCase
public class AbstractCoordinatorTestCase.Cluster
extends Object
implements org.elasticsearch.core.Releasable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classMimics a cluster node for testing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidvoidclose()protected List<NamedWriteableRegistry.Entry> getAnyNodeExcept(AbstractCoordinatorTestCase.Cluster.ClusterNode... clusterNodesToExclude) voidvoidintsize()voidUses a default period of time in which to wait for cluster stabilisation, and then verifies that a master has been elected.voidstabilise(long stabilisationDurationMillis) protected longtransportDelayMillis(String actionName)
-
Constructor Details
-
Cluster
public Cluster(int initialNodeCount) -
Cluster
-
-
Method Details
-
becomeCandidate
public static void becomeCandidate(AbstractCoordinatorTestCase.Cluster.ClusterNode node, String reason) -
size
public int size() -
runRandomly
public void runRandomly() -
stabilise
public void stabilise()Uses a default period of time in which to wait for cluster stabilisation, and then verifies that a master has been elected. -
stabilise
public void stabilise(long stabilisationDurationMillis) -
bootstrapIfNecessary
public void bootstrapIfNecessary() -
runFor
-
getAnyLeader
-
getAnyNodeExcept
public AbstractCoordinatorTestCase.Cluster.ClusterNode getAnyNodeExcept(AbstractCoordinatorTestCase.Cluster.ClusterNode... clusterNodesToExclude) -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
extraNamedWriteables
-
transportDelayMillis
-