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

The HEAD-options sweep test is pinned on time, not on machine load #14710

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/14685-the-head-options-sweep-test-is-pinned-on → main 1 commit fork

  • Merged. scout/14685-the-head-options-sweep-test-is-pinned-on was merged into main as 7dacfe8.

Review

Sign in to review this change.
1 file changed +5 −0
test/head-options-sweep.test.ts +5
@@ -14,6 +14,7 @@ import { createUser } from "../src/core/users.ts";
1414 import { setLimit } from "../src/settings/limits.ts";
1515 import { setStrangerLimits, strangerLimits } from "../src/http/strangers.ts";
1616 import { headOf, MEASURE_CAP } from "../src/http/head.ts";
17 import { pinCrawlLag } from "../src/http/crawl.ts";
1718 import { buildApiRouter, buildRouter, serve, type Servers } from "../src/http/server.ts";
1819 import { quietLogs } from "./helpers/globals.ts";
1920 import { pool } from "./helpers/sweep-clock.ts";
@@ -29,6 +30,10 @@ beforeAll(async () => {
2930 // A sweep of every route from one address is not a stranger to be throttled.
3031 const per = strangerLimits(app).perAddress;
3132 setStrangerLimits(app, { perAddress: Object.fromEntries(Object.keys(per).map((k) => [k, 100_000])) as typeof per });
33 // Nor is it a test of load shedding: on a busy machine the loop runs late,
34 // the deep-page budget is divided, and HEAD on a tree page answered 429
35 // where its GET had a 404 (#14601's check). Pinned on time, not on load.
36 pinCrawlLag(app, false);
3237 servers = await serve(app);
3338 const admin = await createUser(app.db, { origin: "seed", trusted: true, username: "alice", email: "[email protected]", password: "a-good-passphrase", adminIfFirst: true });
3439 if (!admin.ok) throw new Error(String(admin.error));

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs