test(cli): retry build-exe --help once on SIGTERM
On loaded CI hosts the bundled binary occasionally takes longer than the 15s timeout to warm up, causing a SIGTERM and a flaky failure even though the build is healthy. Retry once with a 60s timeout before reporting the failure so transient slowness doesn't block releases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -93,10 +93,20 @@ describe("build-exe", () => {
|
|||||||
// Verify no package.json in the isolated dir
|
// Verify no package.json in the isolated dir
|
||||||
expect(existsSync(join(dir, "package.json"))).toBe(false);
|
expect(existsSync(join(dir, "package.json"))).toBe(false);
|
||||||
|
|
||||||
const result = spawnSync(binary, ["--help"], {
|
let result = spawnSync(binary, ["--help"], {
|
||||||
encoding: "utf-8",
|
encoding: "utf-8",
|
||||||
timeout: 15_000,
|
timeout: 15_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Rarely on loaded CI hosts the bundled binary can be slow to warm up.
|
||||||
|
// Retry once with a longer timeout if the first attempt was terminated.
|
||||||
|
if (result.status === null && result.signal === "SIGTERM") {
|
||||||
|
result = spawnSync(binary, ["--help"], {
|
||||||
|
encoding: "utf-8",
|
||||||
|
timeout: 60_000,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (hasKnownBunSqliteLimitation(result)) {
|
if (hasKnownBunSqliteLimitation(result)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user