test(runtime): trim timer-heavy regression suites

This commit is contained in:
Peter Steinberger
2026-03-02 09:45:57 +00:00
parent fd4d157e45
commit 04030ddf68
4 changed files with 27 additions and 50 deletions

View File

@@ -4,7 +4,7 @@ import { createProcessSupervisor } from "./supervisor.js";
type ProcessSupervisor = ReturnType<typeof createProcessSupervisor>;
type SpawnOptions = Parameters<ProcessSupervisor["spawn"]>[0];
type ChildSpawnOptions = Omit<Extract<SpawnOptions, { mode: "child" }>, "backendId" | "mode">;
const OUTPUT_DELAY_MS = 40;
const OUTPUT_DELAY_MS = 15;
async function spawnChild(supervisor: ProcessSupervisor, options: ChildSpawnOptions) {
return supervisor.spawn({
@@ -38,9 +38,9 @@ describe("process supervisor", () => {
const supervisor = createProcessSupervisor();
const run = await spawnChild(supervisor, {
sessionId: "s1",
argv: [process.execPath, "-e", "setTimeout(() => {}, 40)"],
argv: [process.execPath, "-e", "setTimeout(() => {}, 30)"],
timeoutMs: 500,
noOutputTimeoutMs: 20,
noOutputTimeoutMs: 12,
stdinMode: "pipe-closed",
});
const exit = await run.wait();
@@ -84,7 +84,7 @@ describe("process supervisor", () => {
const supervisor = createProcessSupervisor();
const run = await spawnChild(supervisor, {
sessionId: "s-timeout",
argv: [process.execPath, "-e", "setTimeout(() => {}, 40)"],
argv: [process.execPath, "-e", "setTimeout(() => {}, 20)"],
timeoutMs: 1,
stdinMode: "pipe-closed",
});