Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Give parallel Windows CI more timeout headroom (#4680)

nate nowack44c0907dda78
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 \