Commit ad245f6
committed
fix(broker): wake test broker goroutine with Shutdown, not Close (Linux)
The CLI broker tests deadlocked on linux-amd64 CI (10m timeout) while
passing on macOS/Windows: a bare close() does not interrupt a recvmsg
blocked on that fd in another goroutine on Linux (it does on darwin/BSD).
fakeBroker and TestBrokerHTTPClient_RefusedReturnsError join their control
goroutine after teardown, so they hung waiting for a recvmsg that never
returned. Use syscall.Shutdown(SHUT_RDWR) to wake the blocked recvmsg
portably, then join, then close.
Verified: the cross-compiled linux/arm64 test binary runs clean (count=2)
in an ubuntu container; native darwin still passes.1 parent 8703d38 commit ad245f6
1 file changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
231 | 236 | | |
232 | 237 | | |
233 | 238 | | |
234 | | - | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
| 242 | + | |
236 | 243 | | |
237 | 244 | | |
238 | 245 | | |
| |||
0 commit comments