From afc9d819aa1e6dc2cfc7373a6d2c2edd2e66ad2d Mon Sep 17 00:00:00 2001 From: Luis Araya <35828647+Totopo27@users.noreply.github.com> Date: Sat, 10 Oct 2026 16:22:51 -0600 Subject: [PATCH] test(android): preserve reason in JADX cleanup-failure teardown poll (#1639) --- tests/fixtures/android/jadx.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/fixtures/android/jadx.ts b/tests/fixtures/android/jadx.ts index 69dc86be52..49e17c2d50 100644 --- a/tests/fixtures/android/jadx.ts +++ b/tests/fixtures/android/jadx.ts @@ -84,9 +84,20 @@ export const createJadxProtocolFixture = async ( }); // The SDK can close the child transport before process exit settles. // Retry retained ownership without bypassing the supervisor's proof. + // Retain the entire stop result so an incomplete teardown failure reports its reason. await expect - .poll(() => supervisor.stop(), { timeout: 5_000 }) - .not.toMatchObject({ status: "incomplete" }); + .poll( + async () => { + const stopped = await supervisor.stop(); + if (stopped.status === "incomplete") + throw new Error( + `Owned process cleanup incomplete: ${stopped.reason}`, + ); + return stopped.status; + }, + { timeout: 5_000 }, + ) + .not.toBe("incomplete"); if (options.cwd !== undefined) await rm(options.cwd, { recursive: true, force: true }); });