Skip to content

Commit

Permalink
Fix NormalizerAgg test searcher wrapping (#57171)
Browse files Browse the repository at this point in the history
The searcher was randomly wrapping its reader as slow, parallel, or filtered.
This was causing casting issues in the normalizer tests. By removing the
wrapping, the problem goes away.

Closes #57164
  • Loading branch information
talevy authored May 26, 2020
1 parent 60f91d8 commit 7eb5273
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void testCase(ValuesSourceAggregationBuilder<?> aggBuilder, Consumer<Int
termFieldType.setHasDocValues(true);

try (IndexReader indexReader = DirectoryReader.open(directory)) {
IndexSearcher indexSearcher = newSearcher(indexReader, true, true);
IndexSearcher indexSearcher = newIndexSearcher(indexReader);
InternalAggregation internalAggregation = searchAndReduce(indexSearcher, query, aggBuilder, dateFieldType,
valueFieldType, termFieldType);
aggAssertion.accept(internalAggregation);
Expand Down

0 comments on commit 7eb5273

Please sign in to comment.