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

Stop using pytest-randomly in tests #112

Merged
merged 4 commits into from
Aug 31, 2023

Conversation

fnesveda
Copy link
Member

@fnesveda fnesveda commented Aug 30, 2023

This removes the pytest-randomly Pytest plugin, as it doesn't play nice with pytest-xdist.

pytest-randomly (among other things) sets the random seed in the beginning of the tests to the current datetime. pytest-xdist runs the tests in parallel in multiple runners. When you use these two together, it happens that all of the runners have the same random seed, so if you e.g. generate random resource names, all runners will generate the same ones, leading to conflicts.

The other feature of pytest-randomly, running the tests in random order to ensure that the tests are not passing just because of some side effects caused by running in a specific order, does not work with pytest-xdist at all, so there are zero benefits of using pytest-randomly at all.

@fnesveda fnesveda added t-platform Issues with this label are in the ownership of the platform team. adhoc Ad-hoc unplanned task added during the sprint. labels Aug 30, 2023
@fnesveda fnesveda added this to the 71st sprint - Platform team milestone Aug 30, 2023
@fnesveda fnesveda requested review from drobnikj and vdusek August 30, 2023 11:49
@fnesveda fnesveda self-assigned this Aug 30, 2023
Base automatically changed from chore/better-log-tests to master August 31, 2023 09:42
@fnesveda fnesveda merged commit 8d5ba63 into master Aug 31, 2023
@fnesveda fnesveda deleted the chore/stop-using-pytest-randomly branch August 31, 2023 09:45
@fnesveda fnesveda added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. t-platform Issues with this label are in the ownership of the platform team. validated Issues that are resolved and their solutions fulfill the acceptance criteria.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants