Commit 014b32a
fix(test): prevent Python 3.10 post-test hang in CI
On Python 3.10, closing a WebSocket fd from another thread does not
interrupt selectors.EpollSelector.select(), so WSKernelClient's
non-daemon connection_thread can block for up to 10 s after
stop_channels() is called. Python waits for all non-daemon threads at
exit, causing the test suite to hang 10–20 s after the last test.
Patch _run_websocket in conftest to pass ping_timeout=2 so the internal
Dispatcher uses sel.select(2) instead of sel.select(10); the thread
then exits within ≤2 s of close() and the join() succeeds cleanly.
Also add timeout-minutes: 10 to the CI step as a safety net.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 76161d4 commit 014b32a
2 files changed
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
13 | 53 | | |
14 | 54 | | |
15 | 55 | | |
| |||
0 commit comments