Skip to content

Fix extension test process leaks - #2856

Open
ConnorQi01 wants to merge 2 commits into
masterfrom
fix/test-process-cleanup
Open

Fix extension test process leaks#2856
ConnorQi01 wants to merge 2 commits into
masterfrom
fix/test-process-cleanup

Conversation

@ConnorQi01

Copy link
Copy Markdown
Collaborator

Summary

  • Stub adb logcat in Android platform tests so host tests do not launch real adb processes.
  • Stub Edge spawning in the Expo web test so tests do not open a real browser.
  • Clean up extension-owned LogCat monitors after Android tests and when the test runner exits.
  • Start production adb logcat directly with shell disabled so the extension owns the process it terminates.
  • Verify the adb executable, arguments, and shell option passed by AdbHelper.startLogCat.

Safety

Cleanup only uses extension-owned monitor and child-process handles. It does not terminate adb servers, emulators, VS Code, Node, PowerShell, or browsers globally by process name.

Validation

  • npx prettier --check test\extension\android\androidPlatform.test.ts
  • npm run build
  • AdbHelper startLogCat parameter test passes in the Extension Host suite
  • npm test: 307 tests executed, 1 skipped; one intermittent existing 2-second timeout occurred in packager.test.ts
  • Relevant PID snapshot was unchanged before and after the run; no new adb logcat, repository Node, Extension Host, or Edge process remained

Closes #2855

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@ConnorQi01

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Extension tests leak adb and browser processes

1 participant