fix: extend gateway chat test timeout on windows
parent
9f6ea67415
commit
bec1d0d3d4
|
|
@ -57,7 +57,11 @@ const withSessionStore = async <T>(
|
|||
}
|
||||
};
|
||||
describe("gateway server chat", () => {
|
||||
test("handles history, abort, idempotency, and ordering flows", { timeout: 60_000 }, async () => {
|
||||
const timeoutMs = process.platform === "win32" ? 120_000 : 60_000;
|
||||
test(
|
||||
"handles history, abort, idempotency, and ordering flows",
|
||||
{ timeout: timeoutMs },
|
||||
async () => {
|
||||
const tempDirs: string[] = [];
|
||||
const { server, ws } = await startServerWithClient();
|
||||
const spy = vi.mocked(agentCommand);
|
||||
|
|
@ -145,7 +149,11 @@ describe("gateway server chat", () => {
|
|||
(o) => o.type === "res" && o.id === "send-abort-1",
|
||||
8000,
|
||||
);
|
||||
const abortResP = onceMessage(ws, (o) => o.type === "res" && o.id === "abort-1", 8000);
|
||||
const abortResP = onceMessage(
|
||||
ws,
|
||||
(o) => o.type === "res" && o.id === "abort-1",
|
||||
8000,
|
||||
);
|
||||
const abortedEventP = onceMessage(
|
||||
ws,
|
||||
(o) => o.type === "event" && o.event === "chat" && o.payload?.state === "aborted",
|
||||
|
|
@ -266,7 +274,11 @@ describe("gateway server chat", () => {
|
|||
o.payload?.runId === "idem-stop-run",
|
||||
8000,
|
||||
);
|
||||
const stopResP = onceMessage(ws, (o) => o.type === "res" && o.id === "send-stop-2", 8000);
|
||||
const stopResP = onceMessage(
|
||||
ws,
|
||||
(o) => o.type === "res" && o.id === "send-stop-2",
|
||||
8000,
|
||||
);
|
||||
sendReq(ws, "send-stop-2", "chat.send", {
|
||||
sessionKey: "main",
|
||||
message: "/stop",
|
||||
|
|
@ -518,5 +530,6 @@ describe("gateway server chat", () => {
|
|||
await server.close();
|
||||
await Promise.all(tempDirs.map((dir) => fs.rm(dir, { recursive: true, force: true })));
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue