From 03c5c658811e64766d3a2072c1c28a3b65bd22a9 Mon Sep 17 00:00:00 2001 From: Will Griffin Date: Thu, 29 Oct 2026 12:42:39 -0600 Subject: [PATCH] test(jobs): widen terminal-job wait for loaded CI runners --- .../lib/server/job-workspace-runner.integration.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/site/src/lib/server/job-workspace-runner.integration.spec.ts b/apps/site/src/lib/server/job-workspace-runner.integration.spec.ts index c5fa1ee..87fa05e 100644 --- a/apps/site/src/lib/server/job-workspace-runner.integration.spec.ts +++ b/apps/site/src/lib/server/job-workspace-runner.integration.spec.ts @@ -160,6 +160,10 @@ function twoJobBarrier(): () => Promise { }; } +// Ceiling only: the wait resolves as soon as the job reaches a terminal event, +// so the generous budget costs nothing locally but survives a loaded CI runner. +const TERMINAL_JOB_BUDGET_MS = 25_000; + async function waitForTerminalJob( runner: TaskRunner, jobId: string, @@ -176,7 +180,7 @@ async function waitForTerminalJob( timeout = setTimeout(() => { cleanup(); reject(new Error(`Timed out waiting for queued job ${jobId}.`)); - }, 3_000); + }, TERMINAL_JOB_BUDGET_MS); }, (error) => { cleanup(); @@ -205,7 +209,8 @@ async function waitForTerminalJob( } describe('TaskRunner workspace-subject dispatch (SQLite)', { - timeout: 20_000, + // 10s native startup handshake + terminal wait budget + headroom. + timeout: 45_000, }, () => { let database: DatabaseInterface | undefined; let directory: string | undefined;