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 750e1612575f0..43bb7401dba58 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 @@ 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 void setIndex() throws IOException { 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 void testSearch() throws Exception { 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 void testSearch() throws Exception { 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 void testNewReplicasWork() throws Exception { 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 void testClusterState() throws Exception { } - @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 void testShrink() throws IOException { 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 void testShrink() throws IOException { 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 void testShrinkAfterUpgrade() throws IOException { 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 158d5dfda5844..10bdcc234c656 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 @@ 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 @@ private static void addCandidate(String querySource, QueryBuilder expectedQb) { 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 void testQueryBuilderBWC() throws Exception { } 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());