Skip to content

[Bug] Extension tests leak adb and browser processes #2855

Description

@ConnorQi01

Summary

The Extension Host test suite can start real adb logcat and Edge processes. These processes may remain after successful, failed, timed-out, or interrupted test runs, contributing to test-host instability and leaking processes into the developer environment.

Scope

  • Stub adb logcat in Android platform tests instead of starting the real adb executable.
  • Stub browser spawning in the Expo web launch test instead of opening Edge.
  • Clean up LogCat monitors after Android tests and when the Extension Host test runner exits.
  • Start production adb logcat directly without a shell wrapper so the extension owns the process it terminates.
  • Add focused unit coverage for the adb executable, arguments, and shell option passed by AdbHelper.startLogCat.

Safety requirements

  • Only clean up processes represented by extension-owned monitor/process handles.
  • Do not terminate adb servers, emulators, VS Code, Node, PowerShell, or browsers globally by process name.
  • Preserve normal production Android debugging and real adb usage.

Validation

  • Full host tests pass on Windows, Linux, and macOS.
  • No new repository-owned adb, Node, Extension Host, or browser processes remain after tests.
  • Real user Android debugging continues to execute adb logcat directly.

This work is intentionally separate from #2839.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions