From 44c0907dda78618f882b08de26e31c4428bd74b8 Mon Sep 17 00:00:00 2001 From: nate nowack Date: Wed, 29 Jul 2026 10:22:17 -0500 Subject: [PATCH] Give parallel Windows CI more timeout headroom (#4680) pytest-timeout falls back to its thread method on Windows, which os._exit()s the process instead of failing the test. A single slow test therefore kills an xdist worker and fails whichever unrelated test it was running. Co-authored-by: Claude Opus 5 (1M context) --- .github/actions/run-pytest/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/actions/run-pytest/action.yml b/.github/actions/run-pytest/action.yml index e7ee2b8ec..c82e9c0bd 100644 --- a/.github/actions/run-pytest/action.yml +++ b/.github/actions/run-pytest/action.yml @@ -46,6 +46,16 @@ runs: PARALLEL_FLAGS="--numprocesses auto --maxprocesses $MAX_PROCS --dist worksteal" fi + # pytest-timeout has no signal-based method on Windows, so it falls back + # to the thread method, which dumps stacks and os._exit()s the process. + # Under a contended runner that turns a single slow test into a dead + # xdist worker, failing whichever unrelated test that worker happened to + # be running. Give parallel Windows runs more headroom so ordinary + # scheduling jitter does not take a worker down. + if [ "$RUNNER_OS" == "Windows" ] && [ "$MAX_PROCS" != "0" ]; then + TIMEOUT=$((TIMEOUT * 4)) + fi + uv run --no-sync pytest \ --inline-snapshot=disable \ --timeout=$TIMEOUT \