Skip to content

Commit ea6f149

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 48b2dd3 commit ea6f149

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,12 @@ private void assertExpandWildcardsValue(IndicesOptions options, String expectedV
340340
MultiSearchRequest.writeSearchRequestParams(request, builder);
341341
Map<String, Object> map =
342342
XContentHelper.convertToMap(XContentType.JSON.xContent(), BytesReference.bytes(builder).streamInput(), false);
343-
final String value = (String) map.get("expand_wildcards");
344-
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+
}
345349
}
346350
}
347351

0 commit comments

Comments
 (0)