[Test] Make sure the same exception is thrown for every test run. Fixes #25952
This commit is contained in:
parent
fe46ef393b
commit
636748e270
|
@ -799,7 +799,7 @@ public class FunctionScoreTests extends ESTestCase {
|
|||
}
|
||||
|
||||
public void testWithInvalidScores() {
|
||||
IndexSearcher localSearcher = newSearcher(reader);
|
||||
IndexSearcher localSearcher = new IndexSearcher(reader);
|
||||
FunctionScoreQuery query1 = new FunctionScoreQuery(new TermQuery(new Term(FIELD, "out")),
|
||||
new ConstantScoreFunction(Float.NaN), CombineFunction.REPLACE, null, Float.POSITIVE_INFINITY);
|
||||
ElasticsearchException exc = expectThrows(ElasticsearchException.class, () -> localSearcher.search(query1, 1));
|
||||
|
|
Loading…
Reference in New Issue