test(fix): stabilize exec no-output heartbeat timing case

This commit is contained in:
Peter Steinberger
2026-03-02 12:18:18 +00:00
parent 2cda78a0b0
commit f7b8e4be27

View File

@@ -60,17 +60,17 @@ describe("runCommandWithTimeout", () => {
"let count = 0;", "let count = 0;",
'const ticker = setInterval(() => { process.stdout.write(".");', 'const ticker = setInterval(() => { process.stdout.write(".");',
"count += 1;", "count += 1;",
"if (count === 2) {", "if (count === 3) {",
"clearInterval(ticker);", "clearInterval(ticker);",
"process.exit(0);", "process.exit(0);",
"}", "}",
"}, 5);", "}, 6);",
].join(" "), ].join(" "),
], ],
{ {
timeoutMs: 400, timeoutMs: 500,
// Keep a healthy margin above the emit interval while avoiding long idle waits. // Keep a healthy margin above the emit interval while avoiding long idle waits.
noOutputTimeoutMs: 60, noOutputTimeoutMs: 120,
}, },
); );