Commit 42cd006
test: poll log file for shutdown order to tolerate stdout drain lag
ShutDownProject returns once child processes have exited, but each
process's stdout-reader goroutine is abandoned during shutdown
(process.go waitForStdOutErr → procRunCtx.Done) and may still be
flushing the bash trap output to the project log file. Reading the
file once after ShutDownProject is a race: on Linux the flush usually
beats the test; on macOS CI it doesn't, leaving the file empty and
failing the assertion.
Poll the file with a 5s deadline instead, breaking out as soon as the
expected exit order materializes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ae47b07 commit 42cd006
1 file changed
Lines changed: 26 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | 562 | | |
571 | 563 | | |
572 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
573 | 591 | | |
574 | 592 | | |
575 | 593 | | |
| |||
0 commit comments