public final class ExternalTestCluster extends TestCluster
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTERNAL_CLUSTER_PREFIX |
random, transportClientRatio
Constructor and Description |
---|
ExternalTestCluster(java.nio.file.Path tempDir,
Settings additionalSettings,
java.util.Collection<java.lang.Class<? extends Plugin>> pluginClasses,
TransportAddress... transportAddresses) |
Modifier and Type | Method and Description |
---|---|
void |
afterTest()
This method should be executed during tear down, after each test (but after assertAfterTest)
|
Client |
client()
Returns a client connected to any node in the cluster
|
void |
close()
Closes the current cluster
|
void |
ensureEstimatedStats()
Ensures that any breaker statistics are reset to 0.
|
java.lang.Iterable<Client> |
getClients()
Returns an
Iterable over all clients in this test cluster |
java.lang.String |
getClusterName()
Returns the cluster name
|
java.net.InetSocketAddress[] |
httpAddresses()
Returns the http addresses of the nodes within the cluster.
|
int |
numDataAndMasterNodes()
Returns the number of data and master eligible nodes in the cluster.
|
int |
numDataNodes()
Returns the number of data nodes in the cluster.
|
int |
size()
Returns the number of nodes in the cluster.
|
assertAfterTest, beforeIndexDeletion, beforeTest, seed, wipe, wipeAllTemplates, wipeIndices, wipeRepositories, wipeTemplates
public static final java.lang.String EXTERNAL_CLUSTER_PREFIX
public ExternalTestCluster(java.nio.file.Path tempDir, Settings additionalSettings, java.util.Collection<java.lang.Class<? extends Plugin>> pluginClasses, TransportAddress... transportAddresses)
public void afterTest()
TestCluster
afterTest
in class TestCluster
public Client client()
TestCluster
client
in class TestCluster
public int size()
TestCluster
size
in class TestCluster
public int numDataNodes()
TestCluster
numDataNodes
in class TestCluster
public int numDataAndMasterNodes()
TestCluster
numDataAndMasterNodes
in class TestCluster
public java.net.InetSocketAddress[] httpAddresses()
TestCluster
httpAddresses
in class TestCluster
public void close() throws java.io.IOException
TestCluster
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class TestCluster
java.io.IOException
public void ensureEstimatedStats()
TestCluster
ensureEstimatedStats
in class TestCluster
public java.lang.Iterable<Client> getClients()
TestCluster
Iterable
over all clients in this test clustergetClients
in class TestCluster
public java.lang.String getClusterName()
TestCluster
getClusterName
in class TestCluster