Description
test_resources_under_load asserts that the local machine's load average is below 2x the CPU count. When running the test suite in parallel (-n 3), the load spikes from 3 xdist workers + Playwright browser instances, causing a false positive failure.
Observed behavior
AssertionError: Load average 31.17 exceeds 2x CPU count (12)
Options
- Skip this test when running under xdist (detect via
workerinput or PYTEST_XDIST_WORKER env var)
- Measure remote server resources instead of the local machine
- Increase the threshold when parallel execution is detected