[Test] Make sure the same exception is thrown for every test run. Fixes #25952

This commit is contained in:
Jim Ferenczi 2017-07-28 19:02:58 +02:00
parent fe46ef393b
commit 636748e270
1 changed files with 1 additions and 1 deletions

View File

@ -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));