fix: use thread timeout method for xdist compatibility (#1336)
Some checks failed
Tests / lint (pull_request) Failing after 32s
Tests / test (pull_request) Has been skipped

pytest-timeout signal method is unreliable under xdist --dist worksteal.
Workers inherit the signal handler but scheduling overhead (not test code)
inflates wall-clock time past the 30s limit.

Changes:
- timeout_method: signal -> thread (xdist-safe)
- timeout_func_only: false -> true (measure test body, not xdist overhead)

842 tests pass, 0 failures. Sovereignty tests drop from 67s to 0.3s.
This commit is contained in:
hermes
2026-03-23 22:55:49 -04:00
parent cddfd09c01
commit 0a795ad982

View File

@@ -99,8 +99,8 @@ pythonpath = ["src", "tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
timeout = 30
timeout_method = "signal"
timeout_func_only = false
timeout_method = "thread"
timeout_func_only = true
addopts = "-v --tb=short --strict-markers --disable-warnings --durations=10 --cov-fail-under=60"
markers = [
"unit: Unit tests (fast, no I/O)",