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

Setup tests parallelization with pytest-xdist #251

Closed
Tracked by #243
MrNaif2018 opened this issue Oct 11, 2021 · 0 comments · Fixed by #255
Closed
Tracked by #243

Setup tests parallelization with pytest-xdist #251

MrNaif2018 opened this issue Oct 11, 2021 · 0 comments · Fixed by #255
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed

Comments

@MrNaif2018
Copy link
Member

Our test suite is independent, each test can work on a empty db assuming tables were created.
It wasn't always so. Before tests were running fast but were unreliable. Now they are reliable but a bit slow.
We could parallelize the test execution with pytest-xdist. The only requirement is that each distributed worker needs it's own database. This means we need to switch database used during tests, so maybe some refactor is needed, see #247

See this comment about how approximately this should work. Test database should be created only once, and worker databases are created from main (empty) test db as a template. This will be fast. Of course after tests databases need to be cleaned up (note: we don't need posix ipc use as in the comment, just the approximate flow of db creation)

@MrNaif2018 MrNaif2018 added enhancement New feature or request help wanted Extra attention is needed hacktoberfest labels Oct 11, 2021
@MrNaif2018 MrNaif2018 mentioned this issue Oct 11, 2021
24 tasks
@MrNaif2018 MrNaif2018 linked a pull request Oct 24, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant