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

ci:use pytest-xdist to parallelize tests #1623

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

alexrudd2
Copy link
Contributor

@alexrudd2 alexrudd2 commented Apr 24, 2024

https://pypi.org/project/pytest-xdist/

Also I'm pretty sure -s has no effect since Pytest 3.4

@oroulet
Copy link
Member

oroulet commented Apr 25, 2024

Does it handle having some servers run on the same port?
At least it looks like the failed tests are releated to something different....

@alexrudd2
Copy link
Contributor Author

It doesn't do anything automatically (besides run tests in parallel). So the tests might have to be changed to use different ports.

In the past I've used @pytest.mark.parameterize to do this but I'm not sure how these tests are setup.

@alexrudd2 alexrudd2 marked this pull request as draft April 26, 2024 14:27
@alexrudd2
Copy link
Contributor Author

What about binding to port 0, which will cause the OS to assign a random available port? After the server is created, the assigned port can be determined with srv.bserver.port and given to the client.

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