Class ExternalTestCluster

java.lang.Object
org.elasticsearch.test.TestCluster
org.elasticsearch.test.ExternalTestCluster

@Deprecated(forRemoval=true) public final class ExternalTestCluster extends TestCluster
Deprecated, for removal: This API element is subject to removal in a future version.
not a realistic test setup since the removal of the transport client, use ESIntegTestCase for internal-cluster tests or ESRestTestCase otherwise.
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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Fields inherited from class org.elasticsearch.test.TestCluster

    random
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, 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)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a client connected to any node in the cluster
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Closes the current cluster
    void
    Deprecated, 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 an Iterable over all clients in this test cluster
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the cluster name
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns this clusters NamedWriteableRegistry this is needed to deserialize binary content from this cluster that might include custom named writeables
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the http addresses of the nodes within the cluster.
    int
    Deprecated, 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.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the number of data nodes in the cluster.
    int
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EXTERNAL_CLUSTER_PREFIX

      public static final String EXTERNAL_CLUSTER_PREFIX
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

  • Method Details

    • afterTest

      public void afterTest()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      This method should be executed during tear down, after each test (but after assertAfterTest)
      Specified by:
      afterTest in class TestCluster
    • client

      public Client client()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Returns a client connected to any node in the cluster
      Specified by:
      client in class TestCluster
    • size

      public int size()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Returns the number of nodes in the cluster.
      Specified by:
      size in class TestCluster
    • numDataNodes

      public int numDataNodes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Returns the number of data nodes in the cluster.
      Specified by:
      numDataNodes in class TestCluster
    • numDataAndMasterNodes

      public int numDataAndMasterNodes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Returns the number of data and master eligible nodes in the cluster.
      Specified by:
      numDataAndMasterNodes in class TestCluster
    • httpAddresses

      public InetSocketAddress[] httpAddresses()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Returns the http addresses of the nodes within the cluster. Can be used to run REST tests against the test cluster.
      Specified by:
      httpAddresses in class TestCluster
    • close

      public void close() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Closes the current cluster
      Specified by:
      close in class TestCluster
      Throws:
      IOException
    • ensureEstimatedStats

      public void ensureEstimatedStats()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Ensures 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:
      ensureEstimatedStats in class TestCluster
    • getClients

      public Iterable<Client> getClients()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Returns an Iterable over all clients in this test cluster
      Specified by:
      getClients in class TestCluster
    • getNamedWriteableRegistry

      public NamedWriteableRegistry getNamedWriteableRegistry()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Returns this clusters NamedWriteableRegistry this is needed to deserialize binary content from this cluster that might include custom named writeables
      Specified by:
      getNamedWriteableRegistry in class TestCluster
    • getClusterName

      public String getClusterName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: TestCluster
      Returns the cluster name
      Specified by:
      getClusterName in class TestCluster