Apache Lucene open-source search software
Fix seed-dependent failure in TestForceNoBulkScoringQuery (#16369)
정제호062c53046076
diff --git a/lucene/monitor/src/test/org/apache/lucene/monitor/TestForceNoBulkScoringQuery.java b/lucene/monitor/src/test/org/apache/lucene/monitor/TestForceNoBulkScoringQuery.javaindex ebd865f1a1a..e7d39448e62 100644--- a/lucene/monitor/src/test/org/apache/lucene/monitor/TestForceNoBulkScoringQuery.java+++ b/lucene/monitor/src/test/org/apache/lucene/monitor/TestForceNoBulkScoringQuery.java@@ -94,7 +94,10 @@ public class TestForceNoBulkScoringQuery extends LuceneTestCase {iw.commit();try (IndexReader reader = DirectoryReader.open(dir)) {- IndexSearcher searcher = newSearcher(reader);+ // use a plain searcher: newSearcher may wrap with AssertingIndexSearcher, whose+ // ScorerSupplier sometimes builds the bulk scorer from scorer() instead of delegating to+ // bulkScorer(), which breaks the sanity check below for some seeds+ IndexSearcher searcher = new IndexSearcher(reader);// disable query caching, so that we exercise the search path directly rather than// any bulk-scoring optimizations the cache may apply internallysearcher.setQueryCache(null);