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,
org.elasticsearch.common.settings.Settings additionalSettings,
java.util.Collection<java.lang.Class<? extends org.elasticsearch.plugins.Plugin>> pluginClasses,
org.elasticsearch.common.transport.TransportAddress... transportAddresses) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterTest()
This method should be executed during tear down, after each test (but after assertAfterTest)
|
org.elasticsearch.client.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<org.elasticsearch.client.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, wipeTemplatespublic static final java.lang.String EXTERNAL_CLUSTER_PREFIX
public ExternalTestCluster(java.nio.file.Path tempDir,
org.elasticsearch.common.settings.Settings additionalSettings,
java.util.Collection<java.lang.Class<? extends org.elasticsearch.plugins.Plugin>> pluginClasses,
org.elasticsearch.common.transport.TransportAddress... transportAddresses)
public void afterTest()
TestClusterafterTest in class TestClusterpublic org.elasticsearch.client.Client client()
TestClusterclient in class TestClusterpublic int size()
TestClustersize in class TestClusterpublic int numDataNodes()
TestClusternumDataNodes in class TestClusterpublic int numDataAndMasterNodes()
TestClusternumDataAndMasterNodes in class TestClusterpublic java.net.InetSocketAddress[] httpAddresses()
TestClusterhttpAddresses in class TestClusterpublic void close()
throws java.io.IOException
TestClusterclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class TestClusterjava.io.IOExceptionpublic void ensureEstimatedStats()
TestClusterensureEstimatedStats in class TestClusterpublic java.lang.Iterable<org.elasticsearch.client.Client> getClients()
TestClusterIterable over all clients in this test clustergetClients in class TestClusterpublic java.lang.String getClusterName()
TestClustergetClusterName in class TestCluster