perf(test): shorten process timeout fixtures
This commit is contained in:
@@ -38,10 +38,10 @@ describe("runCommandWithTimeout", () => {
|
||||
|
||||
it("kills command when no output timeout elapses", async () => {
|
||||
const result = await runCommandWithTimeout(
|
||||
[process.execPath, "-e", "setTimeout(() => {}, 10_000)"],
|
||||
[process.execPath, "-e", "setTimeout(() => {}, 1_000)"],
|
||||
{
|
||||
timeoutMs: 5_000,
|
||||
noOutputTimeoutMs: 50,
|
||||
timeoutMs: 1_000,
|
||||
noOutputTimeoutMs: 35,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -55,11 +55,11 @@ describe("runCommandWithTimeout", () => {
|
||||
[
|
||||
process.execPath,
|
||||
"-e",
|
||||
'let i=0; const t=setInterval(() => { process.stdout.write("."); i += 1; if (i >= 2) { clearInterval(t); process.exit(0); } }, 10);',
|
||||
'let i=0; const t=setInterval(() => { process.stdout.write("."); i += 1; if (i >= 2) { clearInterval(t); process.exit(0); } }, 5);',
|
||||
],
|
||||
{
|
||||
timeoutMs: 5_000,
|
||||
noOutputTimeoutMs: 160,
|
||||
timeoutMs: 1_000,
|
||||
noOutputTimeoutMs: 120,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -72,7 +72,7 @@ describe("runCommandWithTimeout", () => {
|
||||
|
||||
it("reports global timeout termination when overall timeout elapses", async () => {
|
||||
const result = await runCommandWithTimeout(
|
||||
[process.execPath, "-e", "setTimeout(() => {}, 10_000)"],
|
||||
[process.execPath, "-e", "setTimeout(() => {}, 1_000)"],
|
||||
{
|
||||
timeoutMs: 15,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user