java.io.Closeable, java.lang.AutoCloseablepublic final class ExternalTestCluster extends TestCluster
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
EXTERNAL_CLUSTER_PREFIX |
random, transportClientRatio| Constructor | Description |
|---|---|
ExternalTestCluster(java.nio.file.Path tempDir,
Settings additionalSettings,
java.util.Collection<java.lang.Class<? extends Plugin>> pluginClasses,
TransportAddress... transportAddresses) |
| Modifier and Type | Method | 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
|
NamedWriteableRegistry |
getNamedWriteableRegistry() |
Returns this clusters
NamedWriteableRegistry this is needed to
deserialize binary content from this cluster that might include custom named writeables |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitassertAfterTest, beforeIndexDeletion, beforeTest, seed, wipe, wipeAllTemplates, wipeIndices, wipeRepositories, wipeTemplatespublic 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()
TestClusterafterTest in class TestClusterpublic 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.lang.AutoCloseableclose in interface java.io.Closeableclose in class TestClusterjava.io.IOExceptionpublic void ensureEstimatedStats()
TestClusterensureEstimatedStats in class TestClusterpublic java.lang.Iterable<Client> getClients()
TestClusterIterable over all clients in this test clustergetClients in class TestClusterpublic NamedWriteableRegistry getNamedWriteableRegistry()
TestClusterNamedWriteableRegistry this is needed to
deserialize binary content from this cluster that might include custom named writeablesgetNamedWriteableRegistry in class TestClusterpublic java.lang.String getClusterName()
TestClustergetClusterName in class TestCluster