Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/aa.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -810,7 +813,7 @@ beforeAll(async () => {
await Bun.sleep(120);
}
expect(ready).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/actions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [] }));
Expand Down Expand Up @@ -795,7 +798,7 @@ beforeAll(async () => {
await Bun.sleep(120);
}
expect(ready).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/api-health-comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const comment = (over: Record<string, unknown>) => ({
...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();
Expand Down Expand Up @@ -112,7 +115,7 @@ beforeAll(async () => {
if (!health) await Bun.sleep(150);
}
expect(health).toBeDefined();
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/author-picker-1179.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -113,7 +116,7 @@ beforeAll(async () => {
if (!up) await Bun.sleep(150);
}
expect(up).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/board-cache-5082.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -223,7 +226,7 @@ beforeAll(async () => {
if (!up) await Bun.sleep(150);
}
expect(up).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/boot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -30,7 +33,7 @@ beforeAll(async () => {
await Bun.sleep(120);
}
expect(ready).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/error-boundary-1211.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -77,7 +80,7 @@ beforeAll(async () => {
await Bun.sleep(120);
}
expect(ready).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/health-priming.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -102,7 +105,7 @@ beforeAll(async () => {
if (!firstHealth) await Bun.sleep(150);
}
expect(firstHealth).toBeDefined();
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/health.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -598,7 +601,7 @@ beforeAll(async () => {
await Bun.sleep(120);
}
expect(ready).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/path-segment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -58,7 +61,7 @@ beforeAll(async () => {
await Bun.sleep(120);
}
expect(ready).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/quota-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -61,7 +64,7 @@ beforeAll(async () => {
await Bun.sleep(120);
}
expect(ready).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/slice3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -847,7 +850,7 @@ beforeAll(async () => {
await Bun.sleep(120);
}
expect(ready).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/today-cache-1179.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -270,7 +273,7 @@ beforeAll(async () => {
if (!up) await Bun.sleep(150);
}
expect(up).toBe(true);
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/aggregator/test/watchdog-priming.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -94,7 +97,7 @@ beforeAll(async () => {
if (!firstAttention) await Bun.sleep(150);
}
expect(firstAttention).toBeDefined();
});
}, 60_000);

afterAll(() => {
proc?.kill();
Expand Down