File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
server/src/test/java/org/elasticsearch/index/query/functionscore Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -944,7 +944,7 @@ public void testWithInvalidScores() {
944944 null ,
945945 Float .POSITIVE_INFINITY
946946 );
947- ElasticsearchException exc = expectThrows (ElasticsearchException .class , () -> localSearcher .search (query1 , 1 ));
947+ IllegalArgumentException exc = expectThrows (IllegalArgumentException .class , () -> localSearcher .search (query1 , 1 ));
948948 assertThat (exc .getMessage (), containsString ("function score query returned an invalid score: " + Float .NaN ));
949949 FunctionScoreQuery query2 = new FunctionScoreQuery (
950950 new TermQuery (new Term (FIELD , "out" )),
@@ -953,7 +953,7 @@ public void testWithInvalidScores() {
953953 null ,
954954 Float .POSITIVE_INFINITY
955955 );
956- exc = expectThrows (ElasticsearchException .class , () -> localSearcher .search (query2 , 1 ));
956+ exc = expectThrows (IllegalArgumentException .class , () -> localSearcher .search (query2 , 1 ));
957957 assertThat (exc .getMessage (), containsString ("function score query returned an invalid score: " + Float .NEGATIVE_INFINITY ));
958958 }
959959
You can’t perform that action at this time.
0 commit comments