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 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