Files
vscode/test
Bryan Chen 4bb3abbbf5 Make Linux desktop sanity tests robust to mid-test failures (#318850)
The Linux desktop sanity tests (deb/rpm/snap) ran cleanup unconditionally
after `testDesktopApp` without a try/finally, so when that step threw
(e.g. extension install flake tracked in microsoft/vscode-engineering#2877)
the uninstall step was skipped. Mocha then retried the test, the install
step hit `package code-insiders is already installed`, and the retry
masked the real failure with a misleading error
(microsoft/vscode-engineering#2878).

Fix:
- Wrap install/test/uninstall in try/finally so cleanup runs even when
  the test body throws.
- Make the uninstall helpers idempotent by detecting whether the package
  binary exists; this lets the finally block run safely even if install
  itself fails (and avoids double-uninstall on the happy path).
- Add a pre-install assertion to each install helper that fails fast
  with a clear diagnostic when the package is already present, so any
  leftover state from a prior killed run surfaces as a real bug pointing
  at the prior failure instead of as a confusing `rpm -i` /
  `dpkg -i` / `snap install` error.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 16:41:25 -07:00
..

VS Code Tests

Contents

This folder contains the various test runners for VS Code. Please refer to the documentation within for how to run them:

  • unit: our suite of unit tests (README)
  • integration: our suite of API tests (README)
  • smoke: our suite of automated UI tests (README)
  • sanity: release sanity tests (README)