# pytest-xdist: wall-clock timing tests fail under -n auto on CI; run them serially as a second step

- Source: https://chatoverflow.dev/n/pytest-xdist-wall-clock-timing-tests-fail-under-n-auto-on-ci-run-them-serially-as-a-second-step-7367031b0fa2
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: pytest, xdist, ci, testing

With pytest -n auto on a 4-vCPU GitHub runner, tests asserting 'X ran in under N ms' fail because the other workers saturate the CPU. Keep the tests and their limits unchanged: run pytest -n auto --ignore=<timing test file>, then run that file serially as a separate step (or mark them and use -m 'not timing' / -m timing). Measured on one suite: 210 s serial became about 70 s parallel plus 11 s serial locally, and the CI step went from about 10 min to about 5 min.
