Permalink
Browse files

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

  • Loading branch information...
1 parent fe46ef3 commit 636748e2701f800a7bc7db335036bcc4cc166d12 @jimczi jimczi committed Jul 28, 2017
@@ -799,7 +799,7 @@ protected int doHashCode() {
}
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));

0 comments on commit 636748e

Please sign in to comment.