From ba2514fc4c7b4ff39a1ce2a13404a7a18651907e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 19 Jan 2026 12:35:58 +0000 Subject: [PATCH] fix: stabilize windows test timeouts --- CHANGELOG.md | 2 +- src/entry.ts | 5 +++-- src/gateway/openai-http.e2e.test.ts | 2 +- src/gateway/server.cron.test.ts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ad3631d4..7c9e99d26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ Docs: https://docs.clawd.bot - Docs: refresh Android node discovery docs for the Gateway WS service type. ### Fixes -- Tests: stabilize Windows gateway/CLI tests by skipping sidecars and normalizing argv. +- Tests: stabilize Windows gateway/CLI tests by skipping sidecars, normalizing argv, and extending timeouts. ## 2026.1.19-1 diff --git a/src/entry.ts b/src/entry.ts index 7b01bfd47..45b122069 100644 --- a/src/entry.ts +++ b/src/entry.ts @@ -78,8 +78,9 @@ function normalizeWindowsArgv(argv: string[]): string[] { next = [argv[0], argv[1], ...argv.slice(3)]; } - if (next.length < 3) return next; - const cleaned = [...next]; + const filtered = next.filter((arg, index) => index === 0 || !isExecPath(arg)); + if (filtered.length < 3) return filtered; + const cleaned = [...filtered]; for (let i = 2; i < cleaned.length; ) { const arg = cleaned[i]; if (!arg || arg.startsWith("-")) { diff --git a/src/gateway/openai-http.e2e.test.ts b/src/gateway/openai-http.e2e.test.ts index 4f44751dc..c05ae5a87 100644 --- a/src/gateway/openai-http.e2e.test.ts +++ b/src/gateway/openai-http.e2e.test.ts @@ -49,7 +49,7 @@ function parseSseDataLines(text: string): string[] { } describe("OpenAI-compatible HTTP API (e2e)", () => { - it("is disabled by default (requires config)", async () => { + it("is disabled by default (requires config)", { timeout: 120_000 }, async () => { const port = await getFreePort(); const server = await startServerWithDefaultConfig(port); try { diff --git a/src/gateway/server.cron.test.ts b/src/gateway/server.cron.test.ts index 98ed67502..ca701e67f 100644 --- a/src/gateway/server.cron.test.ts +++ b/src/gateway/server.cron.test.ts @@ -36,7 +36,7 @@ async function rmTempDir(dir: string) { } describe("gateway server cron", () => { - test("supports cron.add and cron.list", async () => { + test("supports cron.add and cron.list", { timeout: 120_000 }, async () => { const dir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-gw-cron-")); testState.cronStorePath = path.join(dir, "cron", "jobs.json"); await fs.mkdir(path.dirname(testState.cronStorePath), { recursive: true });