test-infra: local GMD emulator tests fail (snapshot timeout) — use connectedDebugAndroidTest for local runs #269

Closed
opened 2026-07-03 22:54:23 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-03 22:54:23 +00:00 (Migrated from github.com)

Finding

On this machine (Windows + AEHD hypervisor), Gradle Managed Device instrumented tasks (apiXXDebugAndroidTest) fail during setup: GMD's emulator snapshot creation times out (AvdSnapshotHandler$EmulatorSnapshotCannotCreatedException, retries 5x, each reboot = the 'cycling' we chased for hours). The emulator itself boots fine (verified: 8GB RAM, boot_completed=1, shell-responsive) — only GMD's snapshot step is broken. Root cause: AEHD 2.2 can't complete the snapshot save/load (also caused the earlier -check-snapshot-loadable hangs).

Scope

All LOCAL GMD instrumented tasks: coverage lane 3 (#248), lane 5 (#250), AND the /preflight api35/api36 steps (GMD tasks added in #266) — so preflight as designed fails locally on this box. GMD-specific: CI is unaffected (it uses reactivecircus/android-emulator-runner + connectedDebugAndroidTest, no GMD).

Fix

Use connectedDebugAndroidTest against a manually-provisioned emulator (cold boot, -no-snapshot) for local instrumented tests — same technique as .claude/skills/preflight/api37_e2e.py and CI. Generalize that api37 script to any API level and switch the preflight api35/api36 steps (and local coverage-lane validation) to it. (Optionally investigate disabling GMD snapshots / bumping setupTimeout, but connectedDebugAndroidTest is the known-reliable path.)

DoD

Preflight runs api35/36/37 locally via connectedDebugAndroidTest (no GMD), green on this machine; the AEHD/GMD-snapshot limitation documented.

## Finding On this machine (Windows + AEHD hypervisor), Gradle Managed Device instrumented tasks (`apiXXDebugAndroidTest`) fail during setup: GMD's emulator **snapshot creation times out** (`AvdSnapshotHandler$EmulatorSnapshotCannotCreatedException`, retries 5x, each reboot = the 'cycling' we chased for hours). The emulator itself boots fine (verified: 8GB RAM, `boot_completed=1`, shell-responsive) — only GMD's snapshot step is broken. Root cause: AEHD 2.2 can't complete the snapshot save/load (also caused the earlier `-check-snapshot-loadable` hangs). ## Scope All LOCAL GMD instrumented tasks: coverage **lane 3 (#248)**, **lane 5 (#250)**, AND the **/preflight api35/api36 steps** (GMD tasks added in #266) — so preflight as designed fails locally on this box. GMD-specific: **CI is unaffected** (it uses `reactivecircus/android-emulator-runner` + `connectedDebugAndroidTest`, no GMD). ## Fix Use `connectedDebugAndroidTest` against a manually-provisioned emulator (cold boot, `-no-snapshot`) for local instrumented tests — same technique as `.claude/skills/preflight/api37_e2e.py` and CI. Generalize that api37 script to any API level and switch the preflight api35/api36 steps (and local coverage-lane validation) to it. (Optionally investigate disabling GMD snapshots / bumping setupTimeout, but connectedDebugAndroidTest is the known-reliable path.) ## DoD Preflight runs api35/36/37 locally via connectedDebugAndroidTest (no GMD), green on this machine; the AEHD/GMD-snapshot limitation documented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#269