diff --git a/muted-tests.yml b/muted-tests.yml index 31f1fce5bc5a1..225fe6a80906b 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -408,9 +408,6 @@ tests: - class: org.elasticsearch.xpack.eql.planner.QueryTranslatorTests method: testMatchOptimization issue: https://github.com/elastic/elasticsearch/issues/132894 -- class: org.elasticsearch.xpack.deprecation.DeprecationHttpIT - method: testUniqueDeprecationResponsesMergedTogether - issue: https://github.com/elastic/elasticsearch/issues/132895 - class: org.elasticsearch.search.CCSDuelIT method: testTermsAggs issue: https://github.com/elastic/elasticsearch/issues/132879 diff --git a/x-pack/plugin/deprecation/qa/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java b/x-pack/plugin/deprecation/qa/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java index 389fd7d6843f7..2ea9ac465c317 100644 --- a/x-pack/plugin/deprecation/qa/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java +++ b/x-pack/plugin/deprecation/qa/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java @@ -21,7 +21,6 @@ import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.common.Strings; import org.elasticsearch.common.logging.HeaderWarning; -import org.elasticsearch.common.logging.LoggerMessageFormat; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.core.RestApiVersion; @@ -55,7 +54,6 @@ import static org.elasticsearch.xpack.deprecation.DeprecationSettings.TEST_NOT_DEPRECATED_SETTING; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsInAnyOrder; -import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; import static org.hamcrest.Matchers.hasEntry; @@ -176,46 +174,6 @@ private Response cleanupSettings() throws IOException { return performScopedRequest(request, xOpaqueId() + "-cleanup"); } - /** - * Attempts to do a scatter/gather request that expects unique responses per sub-request. - */ - public void testUniqueDeprecationResponsesMergedTogether() throws IOException { - final String[] indices = new String[randomIntBetween(2, 5)]; - - // add at least one document for each index - for (int i = 0; i < indices.length; ++i) { - indices[i] = "test" + i; - - // create indices with a single shard to reduce noise; the query only deprecates uniquely by index anyway - createIndex(indices[i], Settings.builder().put("number_of_shards", 1).build()); - - int randomDocCount = randomIntBetween(1, 2); - - for (int j = 0; j < randomDocCount; j++) { - final Request request = new Request("PUT", indices[i] + "/" + j); - request.setJsonEntity("{ \"field\": " + j + " }"); - performScopedRequest(request); - } - } - - final String commaSeparatedIndices = String.join(",", indices); - - performScopedRequest(new Request("POST", commaSeparatedIndices + "/_refresh")); - // trigger all index deprecations - Request request = new Request("GET", "/" + commaSeparatedIndices + "/_search"); - request.setJsonEntity("{ \"query\": { \"bool\": { \"filter\": [ { \"deprecated\": {} } ] } } }"); - Response response = performScopedRequest(request); - - final List deprecatedWarnings = getWarningHeaders(response.getHeaders()); - final List> headerMatchers = new ArrayList<>(); - - for (String index : indices) { - headerMatchers.add(containsString(LoggerMessageFormat.format("[{}] index", (Object) index))); - } - - assertThat(deprecatedWarnings, containsInAnyOrder(headerMatchers)); - } - public void testDeprecationWarningsAppearInHeaders() throws Exception { doTestDeprecationWarningsAppearInHeaders(xOpaqueId()); }