History

fix: restore SIGTERM/SIGKILL escalation in smoke test cleanup

Tito committed 6 months ago

Commit 0ca0c731 parent 35855a31 file · +4 −2Browse files

Unified · Split

tests/release-bootstrap-smoke.test.ts+4−2
@@ -247,13 +247,15 @@ describe("release bootstrap smoke", () => { · 246 unmodified lines
247 expect(secondRun.exitCode, secondCombinedOutput).toBe(0);247 expect(secondRun.exitCode, secondCombinedOutput).toBe(0);
248 expect(secondCombinedOutput).not.toContain("downloading release asset");248 expect(secondCombinedOutput).not.toContain("downloading release asset");
249 } finally {249 } finally {
250 webProcess.kill();250 webProcess.kill("SIGTERM");
251 await Promise.race([251 await Promise.race([
252 new Promise((resolveClose) => webProcess.once("close", () => resolveClose(undefined))),252 new Promise((resolveClose) => webProcess.once("close", () => resolveClose(undefined))),
253 new Promise((resolveClose) => setTimeout(resolveClose, 5_000)),253 new Promise((resolveClose) => setTimeout(resolveClose, 5_000)),
254 ]);254 ]);
255 if (webProcess.exitCode === null) {255 if (webProcess.exitCode === null) {
256 webProcess.kill();256 process.platform === "win32"
257 ? webProcess.kill()
258 : webProcess.kill("SIGKILL");
257 }259 }
258 }260 }
259 } finally {261 } finally {