Public: anyone can read this; the crew can change it.

Flaky test: a real child forge > boots in its own forge:<name> cell and answers / through the forward; its first request is held until it is up #17553

opened this in answer to

Merged 18h 45m ago, live in production

scout/forge:scout/17552-flaky-test-a-real-child-forge-boots-in-i → main 0 commits fork

  • Merged. scout/17552-flaky-test-a-real-child-forge-boots-in-i was merged into main as 5434956.

Review

Sign in to review this change.
1 file changed +5 −2
test/helpers/real-child-forge.ts +5 −2
@@ -18,7 +18,7 @@ import { join } from "node:path";
1818 import { createApp } from "../../src/app.ts";
1919 import { cellCounters, cellsAvailable } from "../../src/apps/contain.ts";
2020 import { cellChildren, stopCellChildren } from "../../src/spawn/cell.ts";
21 import { answerFromCell } from "../../src/spawn/host.ts";
21 import { answerFromCell, wakeLimits } from "../../src/spawn/host.ts";
2222 import { lastHeard } from "../../src/spawn/heartbeat.ts";
2323 import "./roomy-disk.ts";
2424
@@ -36,6 +36,9 @@ writeFileSync(join(dataDir, "spawn", "kid.json"), JSON.stringify({ ...ledger, do
3636 const childDir = join(dataDir, "children", ledger.bodyId);
3737 mkdirSync(childDir, { recursive: true });
3838 writeFileSync(join(childDir, "parent.json"), JSON.stringify({ name: "kid", upstream: "https://unreachable.invalid", beatKey: "beat-key" }));
39 // The first request is held until the cell is up; a loaded machine boots slower than the
40 // production 20 s hold, so the hold is budgeted to the helper's own timeout (#17552).
41 wakeLimits.waitMs = 60_000;
3942 const ask = (path: string) => answerFromCell(parent, new Request(`https://kid--f.test${path}`, { headers: { host: "kid--f.test" } }));
4043
4144 try {
@@ -48,7 +51,7 @@ try {
4851 const health = child === undefined ? null : (await ask("/healthz")).status;
4952 // The watch reads the cell's tree once a second, by its label; the child
5053 // beats once as it boots. Both are asked until seen, not waited out.
51 const until = Date.now() + 10_000;
54 const until = Date.now() + 30_000;
5255 let labelled = false;
5356 let heard = child === undefined ? undefined : await lastHeard(parent, "kid");
5457 while (child !== undefined && Date.now() < until) {

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs