Commit 60b3bc7
committed
fix: [sc-106107] Make the wedged-stop assertion measure the stop it issues, and survive launchctl's exit code
The macOS job failed this step immediately after it had printed its own success
message. The pwsh shell ends by exiting with $LASTEXITCODE, and `launchctl stop`
returns non-zero in situations that are not failures here - the repo's own
stop-service action already guards it with `|| true`. Windows and Linux passed
only because sc.exe and systemctl happen to return zero. Report the stop
command's exit code and clear it: whether the stop was honored is decided by the
agent's log, not by the service manager's exit status. The step now exits
explicitly on both paths rather than inheriting whatever was left behind.
That failure also exposed a second, quieter bug: the assertion compared against
the scenario-wide "Service stopped" baseline, but the --update that points the
agent at the stub broker restarts the service and logs its own "Service
stopped". The delta was therefore already satisfied before the stop under test
was issued, which is why the step reported success after 0.2s - it was observing
the update's restart, not the wedged stop, on every platform. Count the lines
immediately before issuing the stop so the delta can only come from it.1 parent d30cacd commit 60b3bc7
1 file changed
Lines changed: 26 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | 523 | | |
525 | 524 | | |
526 | 525 | | |
527 | | - | |
528 | | - | |
| 526 | + | |
529 | 527 | | |
530 | 528 | | |
531 | 529 | | |
| |||
670 | 668 | | |
671 | 669 | | |
672 | 670 | | |
673 | | - | |
674 | 671 | | |
675 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
676 | 686 | | |
677 | 687 | | |
678 | 688 | | |
| |||
683 | 693 | | |
684 | 694 | | |
685 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
686 | 705 | | |
687 | 706 | | |
688 | 707 | | |
689 | 708 | | |
690 | 709 | | |
691 | | - | |
692 | | - | |
693 | | - | |
| 710 | + | |
694 | 711 | | |
695 | 712 | | |
696 | 713 | | |
| |||
700 | 717 | | |
701 | 718 | | |
702 | 719 | | |
| 720 | + | |
703 | 721 | | |
704 | 722 | | |
705 | 723 | | |
| |||
0 commit comments