diff --git a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java index 750e1612575..43bb7401dba 100644 --- a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java @@ -22,9 +22,11 @@ package org.elasticsearch.upgrades; import org.apache.http.util.EntityUtils; import org.elasticsearch.Version; import org.elasticsearch.client.Request; +import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; import org.elasticsearch.client.RestClient; +import org.elasticsearch.client.WarningsHandler; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.Booleans; import org.elasticsearch.common.CheckedFunction; @@ -85,7 +87,6 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { index = getTestName().toLowerCase(Locale.ROOT); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/37920") public void testSearch() throws Exception { int count; if (isRunningAgainstOldCluster()) { @@ -124,6 +125,9 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { mappingsAndSettings.endObject(); Request createIndex = new Request("PUT", "/" + index); createIndex.setJsonEntity(Strings.toString(mappingsAndSettings)); + RequestOptions.Builder options = createIndex.getOptions().toBuilder(); + options.setWarningsHandler(WarningsHandler.PERMISSIVE); + createIndex.setOptions(options); client().performRequest(createIndex); count = randomIntBetween(2000, 3000); @@ -153,7 +157,6 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { assertStoredBinaryFields(count); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/37920") public void testNewReplicasWork() throws Exception { if (isRunningAgainstOldCluster()) { XContentBuilder mappingsAndSettings = jsonBuilder(); @@ -180,6 +183,9 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { mappingsAndSettings.endObject(); Request createIndex = new Request("PUT", "/" + index); createIndex.setJsonEntity(Strings.toString(mappingsAndSettings)); + RequestOptions.Builder options = createIndex.getOptions().toBuilder(); + options.setWarningsHandler(WarningsHandler.PERMISSIVE); + createIndex.setOptions(options); client().performRequest(createIndex); int numDocs = randomIntBetween(2000, 3000); @@ -332,7 +338,6 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/37920") public void testShrink() throws IOException { String shrunkenIndex = index + "_shrunk"; int numDocs; @@ -355,6 +360,9 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { mappingsAndSettings.endObject(); Request createIndex = new Request("PUT", "/" + index); createIndex.setJsonEntity(Strings.toString(mappingsAndSettings)); + RequestOptions.Builder options = createIndex.getOptions().toBuilder(); + options.setWarningsHandler(WarningsHandler.PERMISSIVE); + createIndex.setOptions(options); client().performRequest(createIndex); numDocs = randomIntBetween(512, 1024); @@ -401,7 +409,6 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { assertEquals(numDocs, totalHits); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/37920") public void testShrinkAfterUpgrade() throws IOException { String shrunkenIndex = index + "_shrunk"; int numDocs; @@ -424,6 +431,9 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { mappingsAndSettings.endObject(); Request createIndex = new Request("PUT", "/" + index); createIndex.setJsonEntity(Strings.toString(mappingsAndSettings)); + RequestOptions.Builder options = createIndex.getOptions().toBuilder(); + options.setWarningsHandler(WarningsHandler.PERMISSIVE); + createIndex.setOptions(options); client().performRequest(createIndex); numDocs = randomIntBetween(512, 1024); diff --git a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java index 158d5dfda58..10bdcc234c6 100644 --- a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java +++ b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java @@ -21,7 +21,9 @@ package org.elasticsearch.upgrades; import org.apache.http.util.EntityUtils; import org.elasticsearch.client.Request; +import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.Response; +import org.elasticsearch.client.WarningsHandler; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.InputStreamStreamInput; import org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput; @@ -142,7 +144,6 @@ public class QueryBuilderBWCIT extends AbstractFullClusterRestartTestCase { CANDIDATES.add(new Object[]{"{\"query\": {" + querySource + "}}", expectedQb}); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/37920") public void testQueryBuilderBWC() throws Exception { String index = "queries"; if (isRunningAgainstOldCluster()) { @@ -179,6 +180,9 @@ public class QueryBuilderBWCIT extends AbstractFullClusterRestartTestCase { } mappingsAndSettings.endObject(); Request request = new Request("PUT", "/" + index); + RequestOptions.Builder options = request.getOptions().toBuilder(); + options.setWarningsHandler(WarningsHandler.PERMISSIVE); + request.setOptions(options); request.setJsonEntity(Strings.toString(mappingsAndSettings)); Response rsp = client().performRequest(request); assertEquals(200, rsp.getStatusLine().getStatusCode());