fix(cli): give Windows Codex MCP shim-spawn test a 20s budget (#1824)

Vitest's 5s default flakes under GHA Defender/cold-start on the only
unit test that real-spawns on Windows (#1823). Keep the global unit
default unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
HeavyGee
2026-09-11 15:56:56 +01:00
committed by GitHub
co-authored by Cursor
parent f5e5bcfa10
commit 25af3f8e13
+4 -2
View File
@@ -98,7 +98,9 @@ describe('codexMcpProxy', () => {
await prepared.cleanup();
});
windowsIt('launches a bare command through a temporary Windows shim', async () => {
// Real Windows spawn (cmd shim → node → MCP initialize). Vitest's 5s default
// flakes under GHA Defender/cold-start; assertions are about quoting, not latency.
windowsIt('launches a bare command through a temporary Windows shim', { timeout: 20_000 }, async () => {
const directory = await mkdtemp(join(tmpdir(), 'hapi-codex-mcp-shim-test-'));
const serverPath = join(directory, 'server.js');
const shimPath = join(directory, 'example-mcp.cmd');
@@ -142,7 +144,7 @@ describe('codexMcpProxy', () => {
const timeout = setTimeout(() => {
child.kill();
reject(new Error('Timed out waiting for the Windows MCP shim response'));
}, 5_000);
}, 15_000);
const finish = (error: Error | null, value?: Record<string, unknown>) => {
clearTimeout(timeout);
if (error) {