-
Notifications
You must be signed in to change notification settings - Fork 41
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: run in parallel across 4 workers, 30s -> 12-14s #569
test: run in parallel across 4 workers, 30s -> 12-14s #569
Conversation
20c78d2
to
45559e2
Compare
yup, my local measurements show If I had to pick, I would prefer tests execute in random order so we are more likely to detect if a test affects the state of another test. We could increase the number of threads from 4 to 20 to make it more random, but I'm worried that's not random enough. Another idea is we pass an argument to indicate when we want to run tests randomly or in parallel. So we could either run something like: Option 1: Option 2: |
In case it helps the discussion, here's a sample of ordering when n=20 vs n=4: first run (n=20)
second run (n=20)
first run (n=4)
second run (n=4)
|
I dig it, then we can add a run step to run the tests randomly in CI. I'll update this PR |
f573f29
to
0a29aba
Compare
running test suite in parallel before we get too far we should also monitor pytest-dev/pytest-xdist#229 because right now one cannot run tests in random order as well as run in parallel until then, I've added another makefile target that can run the tests in parallel, and have left that running in CI.
0a29aba
to
c82c98a
Compare
OK I added back another makefile target to run tests in random order (that's the one that will run in CI since we can tolerate a bit longer test run there). And then for local development we can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing. Approved :)
This only updates the dev requirements, that is why the debian package builds are still passing in CI. No update of the Python package index is required.
Description
this PR makes the change to run the test suite in parallel. We should also monitor pytest-dev/pytest-xdist#229 because right now one cannot run tests in random order as well as run in parallel (:cry:), currently favoring running tests fast but open to discussion
Test Plan
Checklist
If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable: