arturobernalg opened a new pull request, #3545: URL: https://github.com/apache/maven-surefire/pull/3545
With runOrder=random and forkCount=1 (the default), DefaultRunOrderCalculator already shuffles the discovered classes with the Surefire seed before they reach the JUnit Platform provider. Passing that same seed to Jupiter's own ClassOrderer$Random/MethodOrderer$Random applies the same permutation a second time, which restricts the final class order to permutation squares instead of a uniformly random order -- with two classes, they never swap. #3544 has a detailed reproducer and simulation of the biased orders this produces. This derives a separate, still-reproducible seed for Jupiter from the Surefire seed, so the two shuffles are no longer correlated. Added JupiterRandomSeedTest, which reproduces the bug's symptom directly (two classes shuffled twice with the same seed never swap) and shows the derived seed removes that restriction, and updated the existing shouldPassSurefireRandomSeedToJupiter test to assert the derived seed instead of the raw one. Full surefire-junit-platform test suite, checkstyle and spotless pass locally. --- To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) check one of the following: - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) - [x] I hereby declare that I have filed an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- 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]
