Skip to content

Android smoke slow test: released emulator is never demoted to shutdown after cleanup #1087

Closed

Description

@V3RON

What happens

The slow-lane test e2e/slow-android-smoke.test.ts > "Android smoke (real emulator/adb) > catalog lists Simlock's Pixel 9 first, a cold lease of Pixel 9 boots a real emulator ... and a shut-down emulator reports erasableReadable:false ..." fails on main.

The catalog and lease steps pass. After release, the test runs cleanup and waits for list --devices to show the AVD in state shutdown. At e2e/slow-android-smoke.test.ts:176 that wait times out: waitFor timed out after 60000ms (device demoted to shutdown).

Evidence

Run on the slow lane with scripts/slow-e2e.sh e2e/slow-android-smoke.test.ts --bail=1, 2026-10-30:

  • origin/main 6e23975ae: fails at e2e/slow-android-smoke.test.ts:176:11 after 95 s. Log: /var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T/simlock-slow-e2e-20261030-185654.log.
  • PR perf(android): keep the avdmanager list device answer while its inputs are unchanged #1079 head bb7c6c4e1 (branch perf/android-avdmanager-cache): same failure, same line, same message, after 175 s. Log: /var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T/simlock-slow-e2e-20261030-185223.log.

So the failure predates PR #1079.

Expected

After release and cleanup, the emulator is shut down and list --devices reports the AVD in state shutdown within 60 s.

Written by an agent.

Activity

  1. added
    bug:new
    on Oct 30, 2026
  2. self-assigned this
    on Oct 30, 2026
  3. V3RON commented on Oct 30, 2026

    @V3RON
    ContributorAuthor

    Defect, in the test, not the product. The daemon keeps the released emulator ready on purpose (ADR 0038, the learned warm pool). The slow test was never updated for that, so its wait for shutdown cannot succeed. It has been failing since #792 (af224ef, 2026-10-21), well before #1079.

    Reproduction

    e2e/android-smoke-idle-shutdown.test.ts on bug/1087-repro: "with the slow Android smoke's config, cleanup demotes a released Pixel 9 that has been idle past idle.shutdownAfterMs to shutdown". It runs the slow test's lease, release and cleanup with the fake driver and the same configOverrides.

    pnpm test:e2e e2e/android-smoke-idle-shutdown.test.ts
    AssertionError: cleanup must demote the idle released device: expected 'ready' to be 'shutdown'
    

    With warmPool: { learn: false } added to the overrides, the same test passes.

    Root cause

    e2e/slow-android-smoke.test.ts:94 starts the daemon with { idle: { shutdownAfterMs: 300 } } and nothing else, so warmPool.enabled and warmPool.learn keep their defaults (true, src/core/warm-pool/config.ts:46-47). On lease.granted the pool learns the Pixel 9 kind. WarmPool.targeted() (src/core/warm-pool/converger.ts:309) then returns the released device, and the idle-shutdown rule skips any targeted device (src/core/cleanup/idle-shutdown.ts:9). The symptom shows at e2e/slow-android-smoke.test.ts:176. #792 made this change on purpose and updated the fast tests (e2e/capacity-cleanup-nuke.test.ts:161, e2e/warm-pool-learned.test.ts:49), but not this slow test.

    Simplest fix

    Add warmPool: { learn: false } to the slow test's configOverrides (line 94). Then delete the reproduction test, or keep its config in step: the slow test is the regression test, and the learned-pool behaviour is already proved by warm-pool-learned.test.ts.

    Alternatives rejected

    • warmPool: { enabled: false }: also works, but turns off more than the test needs.
    • Running warm forget before cleanup: adds a step to a smoke test that is not about the warm pool.
    • Changing the product: it does what ADR 0038 says.

    Risk

    • Confirm with one slow-lane run of e2e/slow-android-smoke.test.ts. The steps after the demotion (doctor, the erasable mark) have not run on hardware since 2026-10-21.

    Side findings

    Written by an agent.

  4. removed their assignment
    on Oct 30, 2026
  5. added
    bug:ready
    and removed
    bug:new
    on Oct 30, 2026
  6. self-assigned this
    on Oct 30, 2026
  7. V3RON commented on Oct 30, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: #1096 (#1087)
    Parked: none
    Waiting: none
    Decided: none

    Written by an agent.

  8. added a commit that references this issue on Oct 30, 2026
    8d5dc67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions