Skip to content

Commit aae9426

Browse files
committed
test(ci): budget the server-bind and tsc-spawn cases the windows runner measured over 5s
The invalid-token management test binds a real server and issues live fetches (5.04s measured on the self-hosted windows runner) and the translator type-contract test spawns two real tsc processes (5.46s); both waits are intrinsic to their assertions, so they get the server and spawn budgets with the measurements recorded.
1 parent 6cb641c commit aae9426

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

tests/server-management-auth.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
2+
import { SERVER_BUDGET_MS } from "./helpers/test-budget";
23
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
34
import { tmpdir } from "node:os";
45
import { join } from "node:path";
@@ -446,7 +447,7 @@ describe("management and data-plane credential separation", () => {
446447
} finally {
447448
await server.stop(true);
448449
}
449-
});
450+
}, SERVER_BUDGET_MS); // binds a real server + live fetches; windows runner measured ~5.04s against Bun's 5s default.
450451

451452
test("an existing management token ACL hardening failure keeps management unavailable", async () => {
452453
delete process.env.OPENCODEX_ADMIN_AUTH_TOKEN;

tests/translator-budget.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
translatorObservedBufferSnapshot,
1111
} from "../src/lib/translator-budget";
1212
import type { AdapterEvent } from "../src/types";
13+
import { SPAWN_BUDGET_MS } from "./helpers/test-budget";
1314

1415
async function textWithin(stream: ReadableStream<Uint8Array>, timeoutMs = 2_000): Promise<string> {
1516
return await Promise.race([
@@ -253,4 +254,4 @@ test("production adapter contract rejects omitted translator budgets at typechec
253254
expect(invalid.stdout.toString() + invalid.stderr.toString()).toContain("TS2554");
254255
const valid = Bun.spawnSync(["bun", ...base, "tests/fixtures/translator-budget-required.valid.ts"]);
255256
expect(valid.exitCode).toBe(0);
256-
});
257+
}, SPAWN_BUDGET_MS); // two real tsc child processes ARE the assertion; windows runner measured ~5.5s against Bun's 5s default.

0 commit comments

Comments
 (0)