mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-12 02:28:05 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user