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

Usage of new Random(constant seed) in tests #6227

Open
leventov opened this issue Aug 24, 2018 · 3 comments
Open

Usage of new Random(constant seed) in tests #6227

leventov opened this issue Aug 24, 2018 · 3 comments

Comments

@leventov
Copy link
Member

On the one hand, it's good because it makes the tests 100% deterministic and test failures reproducible.

On the other hand, compared to ThreadLocalRandom.current() or new Random(seed) with a random seed, a constant seed may not allow to explore all input conditions and discover some failing corner cases.

So ideally the seed should be generated randomly and be a parameter of a test, recorded in the test name. So when a test fails, it could be run locally with the known seed parameter in order to reproduce a test failure.

@leventov
Copy link
Member Author

Related to #6226

@stale
Copy link

stale bot commented Jun 20, 2019

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@druid.apache.org list. Thank you for your contributions.

@github-actions
Copy link

This issue has been marked as stale due to 280 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If this issue is still
relevant, please simply write any comment. Even if closed, you can still revive the
issue at any time or discuss it on the dev@druid.apache.org list.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 13, 2023
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