From f804bb1917d821d4c909957f1722e993f2aa841e Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Tue, 31 Jan 2017 16:09:25 +0000 Subject: [PATCH] Removes ensureGreen from PlainlessDomainSplitIT (elastic/elasticsearch#839) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This shouldn’t be needed as the cluster no longer goes red when an index is created. Original commit: elastic/x-pack-elasticsearch@b554ea9caf551a462746f4c0f184f031570a6d1e --- .../xpack/ml/transforms/PainlessDomainSplitIT.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/ml/transforms/PainlessDomainSplitIT.java b/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/ml/transforms/PainlessDomainSplitIT.java index 768ce4237b7..de828736c9c 100644 --- a/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/ml/transforms/PainlessDomainSplitIT.java +++ b/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/ml/transforms/PainlessDomainSplitIT.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.ml.transforms; import com.fasterxml.jackson.databind.ObjectMapper; + import org.apache.http.entity.StringEntity; import org.apache.http.util.EntityUtils; import org.elasticsearch.client.Response; @@ -15,7 +16,6 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.StreamsUtils; import org.elasticsearch.test.rest.ESRestTestCase; - import java.io.IOException; import java.util.ArrayList; import java.util.Collections; @@ -263,13 +263,6 @@ public class PainlessDomainSplitIT extends ESRestTestCase { tests.add(new TestConfiguration(null, "shishi.xn--fiqs8s","shishi.xn--fiqs8s")); } - private void ensureGreen() throws IOException { - Map params = new HashMap<>(); - params.put("wait_for_status", "green"); - params.put("wait_for_no_relocating_shards", "true"); - assertOK(client().performRequest("GET", "_cluster/health", params)); - } - private void assertOK(Response response) { assertThat(response.getStatusLine().getStatusCode(), anyOf(equalTo(200), equalTo(201))); } @@ -286,7 +279,6 @@ public class PainlessDomainSplitIT extends ESRestTestCase { .put(IndexMetaData.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 0); createIndex("painless", settings.build()); - ensureGreen(); client().performRequest("PUT", "painless/test/1", Collections.emptyMap(), new StringEntity("{\"test\": \"test\"}")); client().performRequest("POST", "painless/_refresh");