fix: use thread timeout method for xdist compatibility (#1336)
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:
@@ -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)",
|
||||
|
||||
Reference in New Issue
Block a user