You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(android): port-collision give-up test races the fake emulator's exit against boot polling #210
packages/android/test/emulator.test.ts > port collisions outside the reservation registry > gives up after the bounded retries and keeps the collision diagnosis failed once in CI with expected startEmulator to reject (run 36172915229 on #208, passed on rerun and 5/5 locally).
The fake emulator prints address already in use and exits 1, but the test pairs it with BOOTING_ADB_SCRIPT, which reports emulator-5554 as a booted device. If a boot poll (20 ms interval) sees sys.boot_completed=1 before the emulator's exit is observed, startEmulator resolves instead of reporting the collision.
Make the collision tests use an adb fake that never reports boot, or have startEmulator prefer an observed early exit over a concurrent boot signal
Confirm the test is stable under load (for example a nice'd loop)
This failed again in CI on PR #221, which changes only the desktop zenity tests. It failed in the bun run test:coverage step of the test job (attempt 3 of run 37135747544), with "Error: expected startEmulator to reject" at packages/android/test/emulator.test.ts:400. The same commit passed attempts 1 and 2.
More evidence from the #250 and #252 work. Under two concurrent full suites, "port collisions outside the reservation registry" failed with EADDRINUSE on the fixed port 127.0.0.1:5670. The "retries on a fresh port" test then failed with expected ['5672'] to deeply equal ['5670','5672']. "gives up after the bounded retries and keeps the collision diagnosis" also failed once in a full suite with "expected startEmulator to reject", and passed alone on the branch and on origin/main. A per-run free port would remove the cross-run collision.
Re-checked after the host RTTIME fix from #253. Four rounds of two concurrent full suites on main be2d00c did not reproduce this, and no test process was SIGKILLed. The issue describes a timing assumption in the test code, so it stays open. A starved-CPU run, as in the original report, is still the way to confirm the fix.
Seen again while fixing #280 (PR #289). In 15 rounds of two concurrent copies of emulator.test.ts with PR #289, the only failure was this give-up test (expected startEmulator to reject at the give-up case), 1 of 30 runs. PR #289 serializes the file across runs, so this failure comes from inside one run.
Activity
ElbertePlinio commentedon Oct 3, 2026
This failed again in CI on PR #221, which changes only the desktop zenity tests. It failed in the
bun run test:coveragestep of thetestjob (attempt 3 of run 37135747544), with "Error: expected startEmulator to reject" atpackages/android/test/emulator.test.ts:400. The same commit passed attempts 1 and 2.Failed job: https://github.com/pickforge/pickforge/actions/runs/37135747544/job/111243035416
ElbertePlinio commentedon Oct 6, 2026
More evidence from the #250 and #252 work. Under two concurrent full suites, "port collisions outside the reservation registry" failed with EADDRINUSE on the fixed port 127.0.0.1:5670. The "retries on a fresh port" test then failed with expected ['5672'] to deeply equal ['5670','5672']. "gives up after the bounded retries and keeps the collision diagnosis" also failed once in a full suite with "expected startEmulator to reject", and passed alone on the branch and on origin/main. A per-run free port would remove the cross-run collision.
ElbertePlinio commentedon Oct 7, 2026
Re-checked after the host RTTIME fix from #253. Four rounds of two concurrent full suites on main be2d00c did not reproduce this, and no test process was SIGKILLed. The issue describes a timing assumption in the test code, so it stays open. A starved-CPU run, as in the original report, is still the way to confirm the fix.
ElbertePlinio commentedon Oct 7, 2026
Seen again while fixing #280 (PR #289). In 15 rounds of two concurrent copies of
emulator.test.tswith PR #289, the only failure was this give-up test (expected startEmulator to rejectat the give-up case), 1 of 30 runs. PR #289 serializes the file across runs, so this failure comes from inside one run.