Commit c3424e9
committed
test(service): pin the platform default, not just the explicit flag
Every existing case passed canRespawn explicitly, so the derivation itself
was untested: a regression to `?? false` would have left all five green
while Windows silently lost the restart window that lidge-jun#764 needs.
The new case drives both platforms through the default with a mocked
process.platform -- Linux completes at fake-clock 0 after one probe, Windows
polls past 7000. Ablation to `?? false`: 5 pass / 1 fail; restored 6/6.
Worth recording why the default is right, since the review checked it
properly: the launchd plist does set KeepAlive and the systemd unit uses
Restart=on-failure, so both CAN restart a child. But `ocx service stop`
unloads the launchd job and issues a blocking `systemctl --user stop`, and
neither is the crash exit those policies react to. The Windows scheduler
wrapper surviving `schtasks /end` remains the one real survivor case.1 parent 5530b8c commit c3424e9
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
96 | 128 | | |
0 commit comments