Commit 81f3f68
committed
test(tray): budget the socket-inheritance proof for what it actually does
The test failed on windows-latest at 5159ms. Production allows
PowerShell 15s (execFileSync timeout in src/tray/windows.ts), while
Bun's default test budget is 5s, and a contended runner lands between
the two. The test was failing having done nothing wrong.
Raising a budget is not the general answer to a flaky test, and this
round is the reason to say so out loud: the sidebar route tests were
fixed earlier today by DELETING their real gh spawn, because spawning a
binary was incidental to what they claimed. Here the opposite holds.
This test launches PowerShell, which launches a Bun child, then rebinds
the port to prove the child never inherited the listen socket. The
processes are the assertion. There is no version of this proof that
fakes them, so the only honest fix is a budget that covers the work.
The distinction worth carrying forward is whether the wait is intrinsic
to the assertion. It is here; it was not there.
The pid-file wait becomes deadline-based rather than a fixed 100x25ms
count, and says what went wrong on timeout. A bare false told you the
file was missing and nothing about whether PowerShell never started, the
child died, or the runner was just slow.
No assertion changed: both process.kill liveness checks and the port
rebind are untouched.1 parent cd46a34 commit 81f3f68
1 file changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
247 | 263 | | |
248 | 264 | | |
249 | 265 | | |
| |||
267 | 283 | | |
268 | 284 | | |
269 | 285 | | |
270 | | - | |
| 286 | + | |
| 287 | + | |
271 | 288 | | |
272 | 289 | | |
273 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
274 | 297 | | |
275 | 298 | | |
276 | 299 | | |
| |||
293 | 316 | | |
294 | 317 | | |
295 | 318 | | |
296 | | - | |
| 319 | + | |
297 | 320 | | |
298 | 321 | | |
299 | 322 | | |
| |||
0 commit comments