test(android): retry verified cleanup during fixture teardown

This commit is contained in:
morluto
2026-10-10 15:29:42 +08:00
parent b12d0c6361
commit 2596f8da14
+5 -4
View File
@@ -74,10 +74,11 @@ export const createJadxProtocolFixture = async (
ownsProcessLifetime: true,
cleanup: () => cleanupOwnedProcessGroup(spawned.ownership),
});
const stopped = await supervisor.stop();
expect(stopped, JSON.stringify(stopped)).not.toMatchObject({
status: "incomplete",
});
// The SDK can close the child transport before process exit settles.
// Retry retained ownership without bypassing the supervisor's proof.
await expect
.poll(() => supervisor.stop(), { timeout: 5_000 })
.not.toMatchObject({ status: "incomplete" });
if (options.cwd !== undefined)
await rm(options.cwd, { recursive: true, force: true });
});