From f99d95b4c604127363f5fa766103a5214496f1ee Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 21:08:45 +0200 Subject: [PATCH] Test: the hung export's grandchild is the one that is new since the orphan's Co-Authored-By: Claude Opus 5.5 --- scripts/test-vili-daemon.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index 93f95ac..c63aa06 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -1472,12 +1472,13 @@ test("a failing or hung Blender fails the job, leaks nothing, and leaves nothing await until(() => !isAlive(left), "what Blender left running to be killed with its group"); const before = daemon.starts().length; + known.add(left); const hung = await generate(daemon, exportRequest({ clipName: "hang", exportTimeoutMs: 2500 })); assert.equal(hung.status, 502); assert.equal(hung.body.error, "fbx-export-failed (signal SIGKILL)"); const [run] = daemon.starts().slice(before); - await until(() => daemon.blenderGrandchildren().length === 1, "the hung Blender's grandchild"); - await until(() => !isAlive(run.pid) && !isAlive(daemon.blenderGrandchildren()[0]), "the hung export's group to be dead"); + const stuck = await until(() => daemon.blenderGrandchildren().filter((pid) => !known.has(pid))[0], "the hung Blender's grandchild"); + await until(() => !isAlive(run.pid) && !isAlive(stuck), "the hung export's group to be dead"); assert.equal(hung.body.files.some((file) => file.name.endsWith(".fbx")), false); } finally { await daemon.stop();