Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassOrderer$Random with seed does not work #3779

Closed
1 task
patrick-dedication opened this issue Apr 16, 2024 · 3 comments
Closed
1 task

ClassOrderer$Random with seed does not work #3779

patrick-dedication opened this issue Apr 16, 2024 · 3 comments

Comments

@patrick-dedication
Copy link

Steps to reproduce

JUnit 5.10.2
Have three test files and use junit.jupiter.execution.order.random.seed in combination with junit.jupiter.testclass.order.default=org.junit.jupiter.api.ClassOrderer$Random in junit-platform.properties.
Run the tests multiple times, they have a different order each time.
As far as I see this is because ClassOrderer::orderClasses gets a differently ordered list from context.getClassDescriptors() with almost every test-run.

Context

  • Used versions (Jupiter/Vintage/Platform):
  • Build Tool/IDE:

Deliverables

  • ...
@sbrannen
Copy link
Member

Please provide a sample project which reproduces the issue so that we can run it ourselves -- for example, a public Git repository or a ZIP file attached to this issue.

Thanks

@patrick-dedication
Copy link
Author

Tried to reproduce, but found out it's an edge case, sorry for wasting you time.

What happens:
I have a gradle Task to run the test suite 10 times, when I pick the seed from the first failing run and run the tests with the default test task then the order is different, but consistent.
So I guess my way of reproducing/fixing problems is not optimal.

@sbrannen sbrannen closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2024
@sbrannen
Copy link
Member

Tried to reproduce, but found out it's an edge case, sorry for wasting you time.

No problem.

Thanks for letting us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants