Skip to content

Commit 6414268

Browse files
authored
test(server): the fake Claude CLI exits with its parent (#14926)
Signed-off-by: Yordis Prieto <[email protected]>
1 parent 7ff2eab commit 6414268

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎apps/server/src/provider/Layers/ClaudeCapabilitiesProbe.test.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,14 @@ it.layer(NodeServices.layer)("Claude capability probe SDK boundary", (it) => {
129129
" });",
130130
" }",
131131
"});",
132-
"setInterval(() => {}, 1_000);",
132+
"// Stay alive for follow-up control requests, but never outlive the",
133+
"// parent: the probe aborts the SDK without awaiting the child, so an",
134+
"// unconditional interval would strand this process until reboot.",
135+
"const keepAlive = setInterval(() => {}, 1_000);",
136+
'lines.on("close", () => {',
137+
" clearInterval(keepAlive);",
138+
" process.exit(0);",
139+
"});",
133140
"",
134141
].join("\n"),
135142
);

0 commit comments

Comments
 (0)