Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

test(ci): stabilize JADX recovery and ignore generated reports (#1668)

You Wish0a6b46d5b029
diff --git a/.gitignore b/.gitignore
index cdad8b14d..e1b8d81eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,7 @@ codedb.snapshot
htmlcov/
.coverage
coverage/
+.vitest/
.vitest-reports/
test-results.xml
.turbo/
diff --git a/tests/boundary/process/jadxIntegration.test.ts b/tests/boundary/process/jadxIntegration.test.ts
index e8c296c67..c377a7cfb 100644
--- a/tests/boundary/process/jadxIntegration.test.ts
+++ b/tests/boundary/process/jadxIntegration.test.ts
@@ -527,6 +527,14 @@ it("retries shutdown cleanup after ownership verification recovers", async () =>
"normal",
() => cleanupFails,
);
+ const closeAfterRecovery = async () => {
+ cleanupFails = false;
+ // Closing the transport can leave the child between live and exited
+ // snapshots. Retry retained ownership until cleanup is actually verified.
+ await expect
+ .poll(() => provider.close(), { timeout: 5_000 })
+ .toBeUndefined();
+ };
try {
const outcome = await service.execute("inspect_android_package", {
path: apk,
@@ -538,13 +546,11 @@ it("retries shutdown cleanup after ownership verification recovers", async () =>
const workspace = launches[0]?.cwd;
if (workspace === undefined) throw new Error("Expected acquired workspace");
await expect(access(workspace)).resolves.toBeUndefined();
- cleanupFails = false;
- await provider.close();
+ await closeAfterRecovery();
await verifyCleanup(launches);
expect(launches).toHaveLength(1);
} finally {
- cleanupFails = false;
- await provider.close();
+ await closeAfterRecovery();
}
});