diff --git a/pm-stack/aggregator/test/aa.test.ts b/pm-stack/aggregator/test/aa.test.ts index 595d3f1283..3ae7c3160a 100644 --- a/pm-stack/aggregator/test/aa.test.ts +++ b/pm-stack/aggregator/test/aa.test.ts @@ -778,6 +778,9 @@ let proc: Subprocess<"ignore", "pipe", "inherit"> | null = null; let port = 0; const tmp = mkdtempSync(join(tmpdir(), "agg-aa-")); +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { port = 6100 + Math.floor(Math.random() * 700); const commentsFile = join(tmp, "comments.json"); @@ -810,7 +813,7 @@ beforeAll(async () => { await Bun.sleep(120); } expect(ready).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/actions.test.ts b/pm-stack/aggregator/test/actions.test.ts index 76861b233e..3bc2ff4c42 100644 --- a/pm-stack/aggregator/test/actions.test.ts +++ b/pm-stack/aggregator/test/actions.test.ts @@ -763,6 +763,9 @@ let proc: Subprocess<"ignore", "pipe", "inherit"> | null = null; let port = 0; const tmp = mkdtempSync(join(tmpdir(), "agg-actions-")); +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { port = 6300 + Math.floor(Math.random() * 700); writeFileSync(join(tmp, "comments.json"), JSON.stringify({ version: 1, comments: [] })); @@ -795,7 +798,7 @@ beforeAll(async () => { await Bun.sleep(120); } expect(ready).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/api-health-comments.test.ts b/pm-stack/aggregator/test/api-health-comments.test.ts index 23b2e4fca5..86facb8232 100644 --- a/pm-stack/aggregator/test/api-health-comments.test.ts +++ b/pm-stack/aggregator/test/api-health-comments.test.ts @@ -30,6 +30,9 @@ const comment = (over: Record) => ({ ...over, }); +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { const dir = await mkdtemp(join(tmpdir(), "pm-api-health-comments-")); const now = new Date().toISOString(); @@ -112,7 +115,7 @@ beforeAll(async () => { if (!health) await Bun.sleep(150); } expect(health).toBeDefined(); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/author-picker-1179.test.ts b/pm-stack/aggregator/test/author-picker-1179.test.ts index 4364057d06..c264d23f4a 100644 --- a/pm-stack/aggregator/test/author-picker-1179.test.ts +++ b/pm-stack/aggregator/test/author-picker-1179.test.ts @@ -74,6 +74,9 @@ describe("author picker options (#1179)", () => { let proc: Subprocess | undefined; let base = ""; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { const dir = await mkdtemp(join(tmpdir(), "pm-author-picker-1179-")); const port = 5900 + Math.floor(Math.random() * 800); @@ -113,7 +116,7 @@ beforeAll(async () => { if (!up) await Bun.sleep(150); } expect(up).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/board-cache-5082.test.ts b/pm-stack/aggregator/test/board-cache-5082.test.ts index 08ae4a2410..7121c3ef60 100644 --- a/pm-stack/aggregator/test/board-cache-5082.test.ts +++ b/pm-stack/aggregator/test/board-cache-5082.test.ts @@ -183,6 +183,9 @@ describe("board variants derive from one shared assembly (#5082)", () => { let proc: Subprocess | undefined; let base = ""; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { const dir = await mkdtemp(join(tmpdir(), "pm-board-cache-5082-")); const port = 7000 + Math.floor(Math.random() * 800); @@ -223,7 +226,7 @@ beforeAll(async () => { if (!up) await Bun.sleep(150); } expect(up).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/boot.test.ts b/pm-stack/aggregator/test/boot.test.ts index 0360b89867..6921c46bf4 100644 --- a/pm-stack/aggregator/test/boot.test.ts +++ b/pm-stack/aggregator/test/boot.test.ts @@ -6,6 +6,9 @@ import { spawn, type Subprocess } from "bun"; let proc: Subprocess<"ignore", "pipe", "inherit"> | null = null; let port = 0; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { port = 4100 + Math.floor(Math.random() * 1000); proc = spawn({ @@ -30,7 +33,7 @@ beforeAll(async () => { await Bun.sleep(120); } expect(ready).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/error-boundary-1211.test.ts b/pm-stack/aggregator/test/error-boundary-1211.test.ts index 807f506f33..7fe483861a 100644 --- a/pm-stack/aggregator/test/error-boundary-1211.test.ts +++ b/pm-stack/aggregator/test/error-boundary-1211.test.ts @@ -53,6 +53,9 @@ describe("error-boundary responses (#1211)", () => { let proc: Subprocess<"ignore", "pipe", "inherit"> | null = null; let port = 0; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { port = 4300 + Math.floor(Math.random() * 800); proc = spawn({ @@ -77,7 +80,7 @@ beforeAll(async () => { await Bun.sleep(120); } expect(ready).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/health-priming.test.ts b/pm-stack/aggregator/test/health-priming.test.ts index f6e163ec06..45b514eac9 100644 --- a/pm-stack/aggregator/test/health-priming.test.ts +++ b/pm-stack/aggregator/test/health-priming.test.ts @@ -20,6 +20,9 @@ interface HealthBody { let proc: Subprocess | undefined; let firstHealth: HealthBody | undefined; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { const dir = await mkdtemp(join(tmpdir(), "pm-health-")); const now = new Date().toISOString(); @@ -102,7 +105,7 @@ beforeAll(async () => { if (!firstHealth) await Bun.sleep(150); } expect(firstHealth).toBeDefined(); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/health.test.ts b/pm-stack/aggregator/test/health.test.ts index 838ebae798..9a87d24ea7 100644 --- a/pm-stack/aggregator/test/health.test.ts +++ b/pm-stack/aggregator/test/health.test.ts @@ -574,6 +574,9 @@ describe("buildHealth probes", () => { let proc: Subprocess | null = null; let port = 0; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { port = 6100 + Math.floor(Math.random() * 800); proc = spawn({ @@ -598,7 +601,7 @@ beforeAll(async () => { await Bun.sleep(120); } expect(ready).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/path-segment.test.ts b/pm-stack/aggregator/test/path-segment.test.ts index 1f1dc6a22a..c09cf523cb 100644 --- a/pm-stack/aggregator/test/path-segment.test.ts +++ b/pm-stack/aggregator/test/path-segment.test.ts @@ -34,6 +34,9 @@ describe("decodePathSegment", () => { let proc: Subprocess<"ignore", "pipe", "inherit"> | null = null; let port = 0; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { port = 5100 + Math.floor(Math.random() * 1000); proc = spawn({ @@ -58,7 +61,7 @@ beforeAll(async () => { await Bun.sleep(120); } expect(ready).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/quota-contract.test.ts b/pm-stack/aggregator/test/quota-contract.test.ts index ed22771bfc..a32f2a3e6d 100644 --- a/pm-stack/aggregator/test/quota-contract.test.ts +++ b/pm-stack/aggregator/test/quota-contract.test.ts @@ -36,6 +36,9 @@ const ATTENTION_KINDS = ["credential-lifecycle", "over-limit", "payg-unbilled", const isNumOrNull = (v: unknown) => v === null || (typeof v === "number" && Number.isFinite(v)); const isStrOrNull = (v: unknown) => v === null || typeof v === "string"; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { port = 5100 + Math.floor(Math.random() * 1000); proc = spawn({ @@ -61,7 +64,7 @@ beforeAll(async () => { await Bun.sleep(120); } expect(ready).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/slice3.test.ts b/pm-stack/aggregator/test/slice3.test.ts index 1ebfd4c3e4..25e407a205 100644 --- a/pm-stack/aggregator/test/slice3.test.ts +++ b/pm-stack/aggregator/test/slice3.test.ts @@ -807,6 +807,9 @@ let port = 0; const tmp = mkdtempSync(join(tmpdir(), "agg-slice3-")); const annotationsFile = join(tmp, "roadmap-annotations.json"); +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { port = 5200 + Math.floor(Math.random() * 800); const commentsFile = join(tmp, "comments.json"); @@ -847,7 +850,7 @@ beforeAll(async () => { await Bun.sleep(120); } expect(ready).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/today-cache-1179.test.ts b/pm-stack/aggregator/test/today-cache-1179.test.ts index 1ae896890a..170132c1bb 100644 --- a/pm-stack/aggregator/test/today-cache-1179.test.ts +++ b/pm-stack/aggregator/test/today-cache-1179.test.ts @@ -231,6 +231,9 @@ describe("TodayCache failure and degraded-state behavior", () => { let proc: Subprocess | undefined; let base = ""; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { const dir = await mkdtemp(join(tmpdir(), "pm-today-cache-1179-")); const port = 6000 + Math.floor(Math.random() * 800); @@ -270,7 +273,7 @@ beforeAll(async () => { if (!up) await Bun.sleep(150); } expect(up).toBe(true); -}); +}, 60_000); afterAll(() => { proc?.kill(); diff --git a/pm-stack/aggregator/test/watchdog-priming.test.ts b/pm-stack/aggregator/test/watchdog-priming.test.ts index dee74da604..a8a30be57c 100644 --- a/pm-stack/aggregator/test/watchdog-priming.test.ts +++ b/pm-stack/aggregator/test/watchdog-priming.test.ts @@ -21,6 +21,9 @@ interface AttentionEntry { let proc: Subprocess | undefined; let firstAttention: AttentionEntry[] | undefined; +// #10467: starting the aggregator subprocess can take longer than bun's +// default 5 s hook budget on a loaded machine; give the hook room to +// reach its own readiness deadline and fail with that message instead. beforeAll(async () => { const dir = await mkdtemp(join(tmpdir(), "pm-watchdog-")); const twoHoursAgo = new Date(Date.now() - 2 * 60 * 60_000).toISOString(); @@ -94,7 +97,7 @@ beforeAll(async () => { if (!firstAttention) await Bun.sleep(150); } expect(firstAttention).toBeDefined(); -}); +}, 60_000); afterAll(() => { proc?.kill();