Skip to content
Open
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
12 changes: 11 additions & 1 deletion src/memory/__tests__/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,17 @@ async function connect(
return client;
}

describe("Streamable HTTP", () => {
// These cases drive a real endpoint over real sockets, and the first one also
// pays the client's first connect. Measured on Windows CI (#5570): a median of
// 140 ms for the first case and never 1 s in 1,040 runs of the suite, yet one
// leg in 56 timed out at Vitest's 5 s default, on a runner so slow that the
// whole suite took five times its median. Nothing in the endpoint or the file
// lock waited; every test was slow at once, and the ones with the most round
// trips crossed the limit. The limit is here to catch a hang, so it sits well
// clear of a slow runner.
const REAL_ENDPOINT_TIMEOUT_MS = 30_000;

describe("Streamable HTTP", { timeout: REAL_ENDPOINT_TIMEOUT_MS }, () => {
let running: RunningHttpServer | undefined;
let graph: Awaited<ReturnType<typeof makeTempGraph>>;

Expand Down
7 changes: 6 additions & 1 deletion src/memory/__tests__/write-limits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,12 @@ describe("write limits", () => {
});
});

describe("write limits over Streamable HTTP", () => {
// A real endpoint over real sockets, and this file's first client connect. On
// Windows CI it takes a median of 72 ms and never took 1 s in 1,040 runs of
// the suite, but it timed out once at Vitest's 5 s default, on a runner that
// slowed the whole suite fivefold (#5570; `http.test.ts` has the detail). The
// limit is here to catch a hang, so it sits well clear of a slow runner.
describe("write limits over Streamable HTTP", { timeout: 30_000 }, () => {
it("holds the endpoint's write tools to the limits it was given", async () => {
vi.spyOn(console, "error").mockImplementation(() => {});
const { filePath, cleanup } = await makeTempGraph();
Expand Down
Loading