Skip to content

Commit 4e53a45

Browse files
authored
Remove DeprecationHttpIT.testUniqueDeprecationResponsesMergedTogether (#135855)
The asserted behavior is unsupported, see #19222. Fixes #132895
1 parent 45ae79a commit 4e53a45

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,6 @@ tests:
408408
- class: org.elasticsearch.xpack.eql.planner.QueryTranslatorTests
409409
method: testMatchOptimization
410410
issue: https://github.com/elastic/elasticsearch/issues/132894
411-
- class: org.elasticsearch.xpack.deprecation.DeprecationHttpIT
412-
method: testUniqueDeprecationResponsesMergedTogether
413-
issue: https://github.com/elastic/elasticsearch/issues/132895
414411
- class: org.elasticsearch.search.CCSDuelIT
415412
method: testTermsAggs
416413
issue: https://github.com/elastic/elasticsearch/issues/132879

x-pack/plugin/deprecation/qa/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.elasticsearch.client.RestClientBuilder;
2222
import org.elasticsearch.common.Strings;
2323
import org.elasticsearch.common.logging.HeaderWarning;
24-
import org.elasticsearch.common.logging.LoggerMessageFormat;
2524
import org.elasticsearch.common.settings.Setting;
2625
import org.elasticsearch.common.settings.Settings;
2726
import org.elasticsearch.core.RestApiVersion;
@@ -55,7 +54,6 @@
5554
import static org.elasticsearch.xpack.deprecation.DeprecationSettings.TEST_NOT_DEPRECATED_SETTING;
5655
import static org.hamcrest.Matchers.allOf;
5756
import static org.hamcrest.Matchers.containsInAnyOrder;
58-
import static org.hamcrest.Matchers.containsString;
5957
import static org.hamcrest.Matchers.equalTo;
6058
import static org.hamcrest.Matchers.everyItem;
6159
import static org.hamcrest.Matchers.hasEntry;
@@ -176,46 +174,6 @@ private Response cleanupSettings() throws IOException {
176174
return performScopedRequest(request, xOpaqueId() + "-cleanup");
177175
}
178176

179-
/**
180-
* Attempts to do a scatter/gather request that expects unique responses per sub-request.
181-
*/
182-
public void testUniqueDeprecationResponsesMergedTogether() throws IOException {
183-
final String[] indices = new String[randomIntBetween(2, 5)];
184-
185-
// add at least one document for each index
186-
for (int i = 0; i < indices.length; ++i) {
187-
indices[i] = "test" + i;
188-
189-
// create indices with a single shard to reduce noise; the query only deprecates uniquely by index anyway
190-
createIndex(indices[i], Settings.builder().put("number_of_shards", 1).build());
191-
192-
int randomDocCount = randomIntBetween(1, 2);
193-
194-
for (int j = 0; j < randomDocCount; j++) {
195-
final Request request = new Request("PUT", indices[i] + "/" + j);
196-
request.setJsonEntity("{ \"field\": " + j + " }");
197-
performScopedRequest(request);
198-
}
199-
}
200-
201-
final String commaSeparatedIndices = String.join(",", indices);
202-
203-
performScopedRequest(new Request("POST", commaSeparatedIndices + "/_refresh"));
204-
// trigger all index deprecations
205-
Request request = new Request("GET", "/" + commaSeparatedIndices + "/_search");
206-
request.setJsonEntity("{ \"query\": { \"bool\": { \"filter\": [ { \"deprecated\": {} } ] } } }");
207-
Response response = performScopedRequest(request);
208-
209-
final List<String> deprecatedWarnings = getWarningHeaders(response.getHeaders());
210-
final List<Matcher<? super String>> headerMatchers = new ArrayList<>();
211-
212-
for (String index : indices) {
213-
headerMatchers.add(containsString(LoggerMessageFormat.format("[{}] index", (Object) index)));
214-
}
215-
216-
assertThat(deprecatedWarnings, containsInAnyOrder(headerMatchers));
217-
}
218-
219177
public void testDeprecationWarningsAppearInHeaders() throws Exception {
220178
doTestDeprecationWarningsAppearInHeaders(xOpaqueId());
221179
}

0 commit comments

Comments
 (0)