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 #145

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

fnesveda
Copy link
Member

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 adhoc Ad-hoc unplanned task added during the sprint. t-platform Issues with this label are in the ownership of the platform team. labels Aug 30, 2023
@fnesveda fnesveda added this to the 71st sprint - Platform team milestone Aug 30, 2023
@fnesveda fnesveda self-assigned this Aug 30, 2023
Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, thanks

@fnesveda fnesveda merged commit afe796a into master Sep 1, 2023
18 checks passed
@fnesveda fnesveda deleted the chore/stop-using-pytest-randomly branch September 1, 2023 06:02
@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.

None yet

3 participants