Skip to content

Commit c81e7dc

Browse files
committed
Fix MultiSearchRequestTests#testWritingExpandWildcards (#72045)
Adjust this random test now that default indices options are not exposed in rest. Relates #71688 Closes #71916
1 parent bc9b41f commit c81e7dc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

server/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ public void testMultiLineSerialization() throws IOException {
314314
}
315315
}
316316

317-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/71916")
318317
public void testWritingExpandWildcards() throws IOException {
319318
assertExpandWildcardsValue(IndicesOptions.fromOptions(randomBoolean(), randomBoolean(), true, true, true, randomBoolean(),
320319
randomBoolean(), randomBoolean(), randomBoolean()), "all");
@@ -341,8 +340,12 @@ private void assertExpandWildcardsValue(IndicesOptions options, String expectedV
341340
MultiSearchRequest.writeSearchRequestParams(request, builder);
342341
Map<String, Object> map =
343342
XContentHelper.convertToMap(XContentType.JSON.xContent(), BytesReference.bytes(builder).streamInput(), false);
344-
final String value = (String) map.get("expand_wildcards");
345-
assertEquals(expectedValue, value);
343+
if (options.equals(SearchRequest.DEFAULT_INDICES_OPTIONS) == false) {
344+
final String value = (String) map.get("expand_wildcards");
345+
assertEquals(expectedValue, value);
346+
} else {
347+
assertNull(map.get("expand_wildcards"));
348+
}
346349
}
347350
}
348351

0 commit comments

Comments
 (0)