From 2596f8da142cde4c92677420df438848c34ea0c3 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Sat, 10 Oct 2026 15:29:37 +0800 Subject: [PATCH] test(android): retry verified cleanup during fixture teardown --- tests/fixtures/android/jadx.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/fixtures/android/jadx.ts b/tests/fixtures/android/jadx.ts index c82469039..8e8ac4884 100644 --- a/tests/fixtures/android/jadx.ts +++ b/tests/fixtures/android/jadx.ts @@ -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 }); });