Commit fbd3b25
committed
Fix two CI flakes surfaced by GitHub Windows runners
1. test_watcher_reloads_after_mtime_change: the test's `_write` helper
set mtime to time.time() after each write, but two back-to-back
writes of the same file on the GitHub-runner Windows filesystem
could land with identical mtimes — defeating the watcher's
mtime-based reload detection. Force mtime forward past the
previous value: `now = max(time.time(), previous + 1.0)`.
2. test_ws_viewer_input_reaches_host_dispatcher (and the related
_authenticates_and_receives_frames / _wrong_token tests): the
socket-level auth-handshake timeouts were hardcoded at 5 s on
both the viewer (`_DEFAULT_AUTH_TIMEOUT_S`) and host
(`_AUTH_TIMEOUT_S` in host.py + `_HANDSHAKE_TIMEOUT_S` in
ws_host.py). On a slow GitHub Windows runner the handshake
recvs exceeded that budget — even though the test asked for a
10 s connect timeout, the per-socket timeout never honored it.
Bump all three to 15 s, AND make viewer.py honor the caller's
explicit `connect(timeout=...)` argument:
`raw_sock.settimeout(max(_DEFAULT_AUTH_TIMEOUT_S, float(timeout)))`.
Both are real defects that would also bite production users on
high-latency / loaded networks; the test failures just gave them
visibility on CI.
Verified: full headless suite 605 passed / 7 skipped / 0 failed
locally after the change.1 parent 5916e50 commit fbd3b25
4 files changed
Lines changed: 16 additions & 7 deletions
File tree
- je_auto_control/utils/remote_desktop
- test/unit_test/headless
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
0 commit comments