diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-04 01:47:26 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-04 01:47:26 +0200 |
| commit | a5255ec984098579d400a631fdf3a2571cb0ca79 (patch) | |
| tree | 5743ab194cc6d07d209d640748ab749753b62513 /pyproject.toml | |
| parent | 753653b4df62723b82d32799825135822886eac7 (diff) | |
| download | meshbay-a5255ec984098579d400a631fdf3a2571cb0ca79.tar.gz | |
test: add pytest-timeout and pin the Windows selector event loop
A hung test could wedge the whole run: aiortc's ICE stack never completes
a loopback DataChannel handshake on Windows' default ProactorEventLoop, and
nothing capped it. Two changes, both no-ops off Windows:
- `timeout = 60` in the root pytest config (+ pytest-timeout in the dev
extras) so a stall fails the test instead of the suite.
- a root conftest that selects WindowsSelectorEventLoopPolicy on win32 only,
which is what aiortc needs there. Trade-off, documented: the selector loop
cannot spawn subprocesses on Windows, so the ffmpeg streaming tests fail
there rather than pass -- they need a per-module override or skipif(win32).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'pyproject.toml')
| -rw-r--r-- | pyproject.toml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml index 000e037..0c99c1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,3 +19,7 @@ testpaths = [ "packages/meshbay-node/tests", ] asyncio_mode = "auto" +# A hung test must not wedge the run — an aiortc handshake on the wrong Windows +# event loop can block forever with no internal timeout. thread method is used +# automatically on Windows (no SIGALRM). +timeout = 60 |