mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-30 13:09:53 -05:00
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>
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: