Skip to content

Run subprocess-starting tests without pytest-xdist #30264

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jkseppan
Copy link
Member

@jkseppan jkseppan commented Jul 5, 2025

I suspect that we are running out of process IDs, or the scheduler
is not letting all subprocesses execute, leading to timeouts in
tests that start subprocesses when there are other tests executing.
This happens often with Python 3.14 tests for some reason.

@rcomer
Copy link
Member

rcomer commented Jul 5, 2025

Similar idea at #29981, but it continued using xdist for everything and just moved all subprocess-using tests to a single worker.

@jkseppan jkseppan force-pushed the separate-subprocess-tests branch from 8b4048c to b817890 Compare July 5, 2025 10:38
jkseppan added a commit to jkseppan/matplotlib that referenced this pull request Jul 6, 2025
I suspect that we are running out of process IDs, or the scheduler
is not letting all subprocesses execute, leading to timeouts in
tests that start subprocesses when other long-running tests are
executing. This happens often with Python 3.14 tests for some reason.

Put the tests that start a subprocess in a separate loadgroup
so that no two of them get executed in parallel.

Alternative to matplotlib#30264.
I suspect that we are running out of process IDs, or the scheduler
is not letting all subprocesses execute, leading to timeouts in
tests that start subprocesses when other long-running tests are
executing. This happens often with Python 3.14 tests for some reason.

Add a new pytest marker for the tests that start a subprocess at
top level, and run these tests in a separate pass without
pytest-xdist parallelization.
@jkseppan jkseppan force-pushed the separate-subprocess-tests branch from ebaa666 to 28eb7a9 Compare July 6, 2025 06:38
@jkseppan
Copy link
Member Author

jkseppan commented Jul 6, 2025

Similar idea at #29981, but it continued using xdist for everything and just moved all subprocess-using tests to a single worker.

I tried that and still saw timeout failures, but there's a slightly cleaned-up version in #30267.

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