Skip to content

Commit 0a05150

Browse files
committed
fix(test): widen aborted/invalid JSON 400 auth budgets on Windows
windows-latest timed out these pool-retry cases at Bun's default 5s under runner contention; match the stalled-body SERVER_BUDGET_MS allowance.
1 parent c4c4200 commit 0a05150

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/server-auth.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,8 @@ describe("server local API auth", () => {
19231923
}
19241924
}, { timeout: SERVER_BUDGET_MS });
19251925

1926+
// Same windows-latest contention budget as the stalled-body case above: abort
1927+
// teardown and harness stop can exceed Bun's default 5s under runner load.
19261928
test("aborted 400 inspection never authorizes a pool retry", async () => {
19271929
let releaseDispatch!: () => void;
19281930
const dispatched = new Promise<void>(resolve => { releaseDispatch = resolve; });
@@ -1944,7 +1946,7 @@ describe("server local API auth", () => {
19441946
} finally {
19451947
await stopPoolRetryHarness(harness);
19461948
}
1947-
});
1949+
}, { timeout: SERVER_BUDGET_MS });
19481950

19491951
test("invalid JSON 400 never authorizes a pool retry", async () => {
19501952
const body = '{"detail":';
@@ -1955,7 +1957,7 @@ describe("server local API auth", () => {
19551957
} finally {
19561958
await stopPoolRetryHarness(harness);
19571959
}
1958-
});
1960+
}, { timeout: SERVER_BUDGET_MS });
19591961

19601962
test("missing or non-string detail never authorizes a pool retry", async () => {
19611963
const bodies = ["{}", '{"detail":null}', '{"detail":400}', '{"detail":{"message":"unsupported"}}'];

0 commit comments

Comments
 (0)