Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

Fix flaky Codex OAuth startup cancel test (#2165)

Joshua Francec5d03b9035b4
diff --git a/test/codex-harness.test.ts b/test/codex-harness.test.ts
index c7bf3464e..ad7986da2 100644
--- a/test/codex-harness.test.ts
+++ b/test/codex-harness.test.ts
@@ -212,7 +212,8 @@ function startupCancellationCodexBinary(dir: string): string {
const fs = require("node:fs");
fs.appendFileSync(${JSON.stringify(join(dir, "starts"))}, "start\\n");
process.on("SIGTERM", () => {
- fs.writeFileSync(${JSON.stringify(join(dir, "closed"))}, "closed");
+ fs.writeFileSync(${JSON.stringify(join(dir, "closed.tmp"))}, "closed");
+ fs.renameSync(${JSON.stringify(join(dir, "closed.tmp"))}, ${JSON.stringify(join(dir, "closed"))});
process.exit(0);
});
process.stdin.resume();