Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

test(sdk): bound shutdown of MCP root probes (#1966)

Michael D'Angelo8323b32969c2
diff --git a/sdk/typescript/tests-ts/runtime.test.ts b/sdk/typescript/tests-ts/runtime.test.ts
index 554bdc836..e47c7fb1e 100644
--- a/sdk/typescript/tests-ts/runtime.test.ts
+++ b/sdk/typescript/tests-ts/runtime.test.ts
@@ -1166,7 +1166,12 @@ for await (const line of createInterface({ input: process.stdin })) {
lines.close();
child.stdin.end();
child.kill();
- await closed;
+ const timeout = setTimeout(() => child.kill("SIGKILL"), 5_000);
+ try {
+ await closed;
+ } finally {
+ clearTimeout(timeout);
+ }
}
};
// Drain both clients before fixture cleanup, including when one fails.