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

test: Make tests run order independent #200

Merged
merged 1 commit into from
May 14, 2021

Conversation

abhiabhi94
Copy link
Collaborator

No description provided.

@abhiabhi94
Copy link
Collaborator Author

Initially I thought of using the pytest plugin pytest-randomly to see if I could detect the flakiness in the one of the tests under the test_services module.

While the flakiness still remains, I have fixed the other tests that they are not run order dependent. I later realized that the flaky test was even flaky when it was run alone, so obviously this wasn't the best idea for it.

Regarding the run-order thing, I would advise not to use raw values for id in the tests, because they make the tests depend upon the order in which they are run. I have fixed a few of such instances in our codebase, as of now.

@Radi85 Radi85 merged commit 9cbe2c3 into Radi85:develop May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants