Skip to content

Fix LuceneTestCase to always use passed random parameter where possible#15725

Merged
rmuir merged 1 commit intoapache:mainfrom
spinscale:lucene-test-case-fix-randomization
Feb 19, 2026
Merged

Fix LuceneTestCase to always use passed random parameter where possible#15725
rmuir merged 1 commit intoapache:mainfrom
spinscale:lucene-test-case-fix-randomization

Conversation

@spinscale
Copy link
Contributor

The LuceneTestCase has quite a few methods that allow passing a Random parameter. In a few of those methods that passed parameter is not used, but the standard random() supplier is called - or usages mixed between the argument and the standard random() call.

While this change seems useful to me from a code perspective, it might also mean, that trying to repeat currently failing test runs might pass with this. Please just go ahead and close if you think it's not worth it.

I also renamed the configureRandom method, because it was not clear to me what it's doing.

@rmuir rmuir added the skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check. label Feb 19, 2026
@rmuir rmuir merged commit 30f17a5 into apache:main Feb 19, 2026
13 of 14 checks passed
gmarouli pushed a commit to gmarouli/lucene that referenced this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:test-framework skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants