Package org.elasticsearch.test
Class ExternalTestCluster
java.lang.Object
org.elasticsearch.test.TestCluster
org.elasticsearch.test.ExternalTestCluster
Deprecated, for removal: This API element is subject to removal in a future version.
External cluster to run the tests against.
It is a pure immutable test cluster that allows to send requests to a pre-existing cluster
and supports by nature all the needed test operations like wipeIndices etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class org.elasticsearch.test.TestCluster
random -
Constructor Summary
ConstructorsConstructorDescriptionExternalTestCluster(Path tempDir, Settings additionalSettings, Collection<Class<? extends Plugin>> pluginClasses, Function<Client, Client> clientWrapper, String clusterName, TransportAddress... transportAddresses) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.This method should be executed during tear down, after each test (but after assertAfterTest)client()Deprecated, for removal: This API element is subject to removal in a future version.Returns a client connected to any node in the clustervoidclose()Deprecated, for removal: This API element is subject to removal in a future version.Closes the current clustervoidDeprecated, for removal: This API element is subject to removal in a future version.Ensures that any breaker statistics are reset to 0.Deprecated, for removal: This API element is subject to removal in a future version.Returns anIterableover all clients in this test clusterDeprecated, for removal: This API element is subject to removal in a future version.Returns the cluster nameDeprecated, for removal: This API element is subject to removal in a future version.Returns this clustersNamedWriteableRegistrythis is needed to deserialize binary content from this cluster that might include custom named writeablesDeprecated, for removal: This API element is subject to removal in a future version.Returns the http addresses of the nodes within the cluster.intDeprecated, for removal: This API element is subject to removal in a future version.Returns the number of data and master eligible nodes in the cluster.intDeprecated, for removal: This API element is subject to removal in a future version.Returns the number of data nodes in the cluster.intsize()Deprecated, for removal: This API element is subject to removal in a future version.Returns the number of nodes in the cluster.Methods inherited from class org.elasticsearch.test.TestCluster
assertAfterTest, beforeIndexDeletion, beforeTest, seed, wipe, wipeIndices, wipeTemplates
-
Field Details
-
EXTERNAL_CLUSTER_PREFIX
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Constructor Details
-
ExternalTestCluster
public ExternalTestCluster(Path tempDir, Settings additionalSettings, Collection<Class<? extends Plugin>> pluginClasses, Function<Client, Client> clientWrapper, String clusterName, TransportAddress... transportAddresses) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
afterTest
public void afterTest()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterThis method should be executed during tear down, after each test (but after assertAfterTest)- Specified by:
afterTestin classTestCluster
-
client
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterReturns a client connected to any node in the cluster- Specified by:
clientin classTestCluster
-
size
public int size()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterReturns the number of nodes in the cluster.- Specified by:
sizein classTestCluster
-
numDataNodes
public int numDataNodes()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterReturns the number of data nodes in the cluster.- Specified by:
numDataNodesin classTestCluster
-
numDataAndMasterNodes
public int numDataAndMasterNodes()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterReturns the number of data and master eligible nodes in the cluster.- Specified by:
numDataAndMasterNodesin classTestCluster
-
httpAddresses
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterReturns the http addresses of the nodes within the cluster. Can be used to run REST tests against the test cluster.- Specified by:
httpAddressesin classTestCluster
-
close
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterCloses the current cluster- Specified by:
closein classTestCluster- Throws:
IOException
-
ensureEstimatedStats
public void ensureEstimatedStats()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterEnsures that any breaker statistics are reset to 0. The implementation is specific to the test cluster, because the act of checking some breaker stats can increase them.- Specified by:
ensureEstimatedStatsin classTestCluster
-
getClients
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterReturns anIterableover all clients in this test cluster- Specified by:
getClientsin classTestCluster
-
getNamedWriteableRegistry
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterReturns this clustersNamedWriteableRegistrythis is needed to deserialize binary content from this cluster that might include custom named writeables- Specified by:
getNamedWriteableRegistryin classTestCluster
-
getClusterName
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:TestClusterReturns the cluster name- Specified by:
getClusterNamein classTestCluster
-
ESIntegTestCasefor internal-cluster tests orESRestTestCaseotherwise.