diff --git a/packages/cli/test/acp/lifecycle.subprocess.test.ts b/packages/cli/test/acp/lifecycle.subprocess.test.ts index ffd0332620..745c3e03f7 100644 --- a/packages/cli/test/acp/lifecycle.subprocess.test.ts +++ b/packages/cli/test/acp/lifecycle.subprocess.test.ts @@ -10,7 +10,9 @@ import { createAcpFixture, expectOk, initialize, newSession, selectConfigOption describe("acp lifecycle subprocess", () => { test("stdin EOF exits cleanly", async () => { await using fixture = await createAcpFixture() - expect(await fixture.spawn().close()).toBe(0) + const acp = fixture.spawn() + await initialize(acp) + expect(await acp.close()).toBe(0) }, 60_000) test("close capability and close request", async () => { diff --git a/packages/cli/test/acp/subprocess.ts b/packages/cli/test/acp/subprocess.ts index 0cb274658a..79afd1b152 100644 --- a/packages/cli/test/acp/subprocess.ts +++ b/packages/cli/test/acp/subprocess.ts @@ -322,7 +322,7 @@ function spawnAcp(input: { readonly env: Record }): inputClosed = true await child.stdin.end() } - const exitCode = await withTimeout(child.exited, 45_000, "ACP did not exit after stdin EOF") + const exitCode = await withTimeout(child.exited, 5_000, "ACP did not exit after stdin EOF") await Promise.all([output, errors]) if (exitCode !== 0) throw new Error(`ACP exited with ${exitCode}: ${stderr}`) return exitCode