jeho-rpls opened a new pull request, #16369:
URL: https://github.com/apache/lucene/pull/16369
`TestForceNoBulkScoringQuery#testBulkScoringIsDisabled` fails
deterministically with some seeds since #16350, e.g. on current `main`:
```
gradlew -p lucene/monitor test --tests
TestForceNoBulkScoringQuery.testBulkScoringIsDisabled
-Dtests.seed=BDD18A3ADD885193 -Dtests.locale=ii-CN -Dtests.timezone=Etc/Zulu
```
```
junit.framework.AssertionFailedError: Expected exception AssertionError but
no exception was thrown
at
org.apache.lucene.monitor.TestForceNoBulkScoringQuery.testBulkScoringIsDisabled(TestForceNoBulkScoringQuery.java:105)
```
The sanity check added in #16350 assumes that searching the un-wrapped
`ThrowsOnBulkScoreQuery` always reaches its `ScorerSupplier#bulkScorer()`. But
`newSearcher(reader)` may wrap the searcher with `AssertingIndexSearcher`,
whose scorer supplier deliberately builds the bulk scorer from `scorer()`
instead of delegating (the `usually(random)` branch in `AssertingWeight` — ~1%
of seeds in normal runs, more under nightly). In that case the expected
`AssertionError` is never thrown and the sanity check fails before the actual
`ForceNoBulkScoringQuery` behavior is exercised.
Since the scorer/bulkScorer dispatch is exactly what this test asserts on,
use a plain `IndexSearcher` so the dispatch is deterministic. The failing seed
above passes with this change (and the sanity check still fires, i.e. the plain
searcher does reach `bulkScorer()`).
First hit on an unrelated PR's CI (#16368). Happy to restructure — e.g. keep
the randomized searcher for the wrapped-query assertion only — if you'd prefer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]