Repository navigation
test: run the extension host integration test suites in parallel - #345867
Merged
Merged
Conversation
Most of an extension host suite is starting VS Code: on Linux, 9 of the 17 suites of the extension host tests take 5-6s, and the scripts launch the suites one after another (180s on Linux, 185s for the remote suites). With INTEGRATION_TEST_PARALLEL=<lanes>, scripts/test-integration.sh and scripts/test-remote-integration.sh run up to that many suites at a time, the longest first, each with its own user data, logs and test resolver folders, and print each suite's output when it finishes. The API tests of a folder and a workspace change the same folder, so they stay in one lane. Without the variable, the suites run one after another as before. The Linux and macOS PR jobs run 4 and 3 lanes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Parallel execution can falsely report success by ignoring lane failures, race on shared Electron rebuilds, and incorrectly attribute extension-suite failures to previously passed node.js tests.
3 open issues
What changed in this PR
This PR adds optional parallel execution to VS Code’s Linux and macOS extension-host integration suites to reduce PR check times, while retaining sequential execution by default.
Changes:
- Adds a shared, group-aware scheduler with per-suite data directories, buffered output, and failure reporting.
- Refactors local and remote integration scripts into registered suite functions.
- Enables four lanes in Linux PR jobs and three on macOS, and documents local usage.
| File | Description |
|---|---|
scripts/test-remote-integration.sh |
Registers remote suites and isolates their client and server directories. |
scripts/test-integration.sh |
Registers local suites while preserving filtering and isolating parallel user data. |
scripts/integration-test-suites.sh |
Adds sequential and parallel scheduling, grouped execution, and result reporting. |
.github/workflows/pr-linux-test.yml |
Enables four parallel lanes for extension-host and remote tests. |
.github/workflows/pr-darwin-test.yml |
Enables three parallel lanes for extension-host and remote tests. |
.github/skills/integration-tests/SKILL.md |
Documents the parallel execution option. |
Review effort: Balanced
4 lanes on an 8-core runner slowed the API tests from 30s to 2 minutes, so their 10s tool registration waits timed out. On macOS, the per-suite user data folders under $TMPDIR made the IPC socket path longer than 103 characters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Base:
|
…gration runs Without VSCODE_SKIP_PRELAUNCH, each launch could download Electron again while another lane ran it. A lane that stopped before its suites finished was ignored, and the EXIT trap blamed a failing parallel suite on the node.js integration tests that ran before. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Logan Ramos (lramos15)
marked this pull request as ready for review
November 3, 2026 19:57
Ross Wollman (rwoll)
approved these changes
Nov 3, 2026
Ross Wollman (rwoll)
approved these changes
Nov 3, 2026
Michael Lively (Yoyokrazy)
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Part of an effort to speed up the PR checks. The extension host integration scripts launch VS Code once per suite, one suite after another, and most of a suite's time is that launch:
test-integration.sh --only-extension-host-tests)test-remote-integration.sh)On Linux, 9 of the 17 extension host suites take 5–6s, which is about one launch. The longest suites are API tests (folder) at 45s (67s remote), Colorize at 30s, Emmet at 21s (37s remote), and Git at 12s (33s remote). On macOS, remote integration (~167s) runs inside
macOS / Remote, the job that finishes last in most PR runs.Changes
scripts/integration-test-suites.sh, sourced by both scripts. Suites are registered withadd_suite <group> <name> <estimated seconds> <title> <function>and run withrun_suites.INTEGRATION_TEST_PARALLEL=<lanes>: up to<lanes>suites run at once, longest groups first, pulled from a queue. Each suite gets its own--user-data-dirand--logsPath. Two instances sharing a user data folder would hand off to each other and exit, and@vscode/test-electronotherwise uses one shared.vscode-test/user-data. Remote suites also get their own test-resolver server data and logs folders; the server already uses--port=0.::errorfor each failed suite.INTEGRATION_TEST_APP_NAME, whosekillallwould quit the other lanes' apps.scripts/test-integration.shandscripts/test-remote-integration.share refactored into suite functions. Commands, order and--suitefiltering are unchanged.INTEGRATION_TEST_PARALLELto 2 on the extension host and remote integration steps./tmp/vscode-it.XXXXXXfolder: under the macOS$TMPDIR, the main IPC socket path in the user data folder exceeded the 103-character limit and that instance failed to start..batscripts), and web integration, whose server listens on a fixed port 8000.Results
The first run used 4 lanes on Linux and 3 on macOS. On an 8-core runner, 4 lanes slowed each instance down so much that it barely helped: the Linux extension host step went from 161s to 128s, but the API tests went from 30s to 2 minutes, so
browser toolsandrun_in_terminaltimed out waiting 10s for their tools to register. With 2 lanes, every check passes:🧪 Run extension host integration tests (Electron)🧪 Run extension host integration tests (Electron)🧪 Run integration tests (Remote)🧪 Run integration tests (Remote)That is about 40–100s per step from one run. The 2-lane run also failed
PolicyExport Integration TestsinWindows / Electron. This PR doesn't change any Windows files, and the same test passed on #345871 at the same base, and the rerun of that job passed it, so it was a flake.Validation
::error, and sequential mode behaves as before.bash -non all three scripts: OKcd build && node --test lib/test/detectChanges.test.ts lib/test/agentHostTestSelection.test.ts: 27/27 passactionlint: clean