File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
server/src/test/java/org/elasticsearch/action/search Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -539,11 +539,11 @@ public void testFailOnExtraCharacters() throws IOException {
539539 }
540540
541541 public void testNullIndex () throws IOException {
542- try {
543- MultiSearchRequest request = parseMultiSearchRequest ( "/org/elasticsearch/action/search/msearch-null.json" );
544- } catch ( ElasticsearchParseException e ) {
545- assertThat ( e . getMessage (), containsString ( "Expected a list of strings but got null " ));
546- }
542+ ElasticsearchParseException e = expectThrows ( ElasticsearchParseException . class , () -> parseMultiSearchRequestFromString ( """
543+ {"index": null}
544+ { "query": {"match_all": {}}}
545+ "" " ));
546+ assertThat ( e . getMessage (), containsString ( "Expected a list of strings but got null" ));
547547 }
548548
549549 private static MultiSearchRequest mutate (MultiSearchRequest searchRequest ) throws IOException {
You can’t perform that action at this time.
0 commit comments