Skip to content

test: CLI auto-allocated serial test and the shared emulator start both probe port 5556 unlocked #306

Closed

Description

@ElbertePlinio

Found in review of PR #302 (#293).

packages/cli/test/commands.test.ts sets AUTO_ALLOCATED_SERIAL = "emulator-5556" and asserts it after android start with no --port, so the allocator probes from the production floor 5556 with no lock and no private window. The read-only shared start in packages/android/test/emulator.test.ts (around line 559) also passes no port or portRange, so it probes 5556 too. If the two run at the same moment in parallel forks or concurrent suites, one probe sees 5556 bound by the other, the allocator moves to 5558, and the CLI assertion fails. The test also fails when a real emulator holds 5556 on the host. No failure has been seen yet.

  • Give the CLI test a private port (--port) or a named test port lock
  • Pass the test port range to the shared start in emulator.test.ts
  • Repeat-run evidence under concurrent suites

Activity

  1. added
    bug
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions