fix: extend gateway chat test timeout on windows
This commit is contained in:
@@ -57,7 +57,11 @@ const withSessionStore = async <T>(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
describe("gateway server chat", () => {
|
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 tempDirs: string[] = [];
|
||||||
const { server, ws } = await startServerWithClient();
|
const { server, ws } = await startServerWithClient();
|
||||||
const spy = vi.mocked(agentCommand);
|
const spy = vi.mocked(agentCommand);
|
||||||
@@ -145,7 +149,11 @@ describe("gateway server chat", () => {
|
|||||||
(o) => o.type === "res" && o.id === "send-abort-1",
|
(o) => o.type === "res" && o.id === "send-abort-1",
|
||||||
8000,
|
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(
|
const abortedEventP = onceMessage(
|
||||||
ws,
|
ws,
|
||||||
(o) => o.type === "event" && o.event === "chat" && o.payload?.state === "aborted",
|
(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",
|
o.payload?.runId === "idem-stop-run",
|
||||||
8000,
|
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", {
|
sendReq(ws, "send-stop-2", "chat.send", {
|
||||||
sessionKey: "main",
|
sessionKey: "main",
|
||||||
message: "/stop",
|
message: "/stop",
|
||||||
@@ -518,5 +530,6 @@ describe("gateway server chat", () => {
|
|||||||
await server.close();
|
await server.close();
|
||||||
await Promise.all(tempDirs.map((dir) => fs.rm(dir, { recursive: true, force: true })));
|
await Promise.all(tempDirs.map((dir) => fs.rm(dir, { recursive: true, force: true })));
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user