Commit be2e207
Handle CLI server stdin EPIPE on teardown
The CLI server process's stdin can emit an asynchronous 'error' during
teardown: killProcessIfRunning() writes a "shutdown" request and then
immediately end()s and kill()s the process, so on Windows the buffered
write can complete with EPIPE once the read end closes. With no listener
this became an unhandled error that faulted whichever operation was
running, causing the flaky "should restart the database and run a query"
failures in the Windows cli-integration tests (the restart command also
restarts the CLI server via cliServer.restartCliServer()).
Attach an 'error' listener to the CLI server's stdin once per process in
launchProcess(). The command outcome is still reported via stdout /
process close, so a genuine failure is not masked; only the redundant
async stream error is handled (and logged).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 90105d62-02ab-405e-9c95-10466c9718141 parent 3c16a18 commit be2e207
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
395 | 411 | | |
396 | 412 | | |
397 | 413 | | |
| |||
0 commit comments