You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "sgup432 (via GitHub)" <gi...@apache.org> on 2026/03/10 19:05:37 UTC
[PR] Fix flaky test - TestNumericFieldStats.testGetStatsMultipleSegments [lucene]
sgup432 opened a new pull request, #15806:
URL: https://github.com/apache/lucene/pull/15806
### Description
Fixes flaky test - https://github.com/apache/lucene/issues/15798
<!--
If this is your first contribution to Lucene, please make sure you have reviewed the contribution guide.
https://github.com/apache/lucene/blob/main/CONTRIBUTING.md
-->
**To reproduce the failure with the exact seed from the issue, ran below:**
./gradlew :lucene:core:test --tests "org.apache.lucene.search.TestNumericFieldStats.testGetStatsMultipleSegments" -Ptests.seed=51F086718472D0EF
That fails with AssertionError at line 236 because the randomized MergePolicy from newIndexWriterConfig() merges the 3 tiny segments into 1, so reader.leaves().size() > 1 is false.
**To verify the fix, re-ran the test with the original failing seed to confirm its fixed now.**
Also ran all the tests 20 times to verify further:
```
./gradlew :lucene:core:test --tests "org.apache.lucene.search.TestNumericFieldStats" -Ptests.iters=20
```
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Fix flaky test - TestNumericFieldStats.testGetStatsMultipleSegments [lucene]
Posted by "sgup432 (via GitHub)" <gi...@apache.org>.
sgup432 commented on PR #15806:
URL: https://github.com/apache/lucene/pull/15806#issuecomment-4033784105
@salvatorecampagna and @romseygeek - FYI
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Fix flaky test - TestNumericFieldStats.testGetStatsMultipleSegments [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #15806:
URL: https://github.com/apache/lucene/pull/15806#issuecomment-4034086868
Thank you.
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Fix flaky test - TestNumericFieldStats.testGetStatsMultipleSegments [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss merged PR #15806:
URL: https://github.com/apache/lucene/pull/15806
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org