Repository navigation
Cancelled test-debug gestures leave no ghost terminal (Linux debug-tests flake) - #610
Merged
Merged
Conversation
…s end disposes its terminal window, so a terminal VS Code never opened can no longer outlive its run
MelbourneDeveloper
enabled auto-merge (squash)
November 19, 2026 17:59
MelbourneDeveloper
added a commit
that referenced
this pull request
Nov 19, 2026
…unting its own (#612) ## TLDR The debug Stop suite no longer counts an earlier suite's still-open test-debug terminal as a ghost of its own. It waits for that terminal to close, and if one never does, fails with a message that names the leak. ## Details - Even after #610, Linux `debug-tests` failed on #611 (head `0d31a1f`, which includes #610). All four Stop variants failed together with `2 !== 1`. - The pre-cancelled gesture no longer creates a terminal at all, so the second terminal predates the test. - The suite just before it, *Debug an MTP test*, ends while its module is still in its own 30-second wait. That run's terminal closes only once the run settles, and the Stop test counted every terminal of that name, globally. - `debug-test-kit.ts` gains `assertNoTerminalLeft(name, why)`. It waits up to `DEBUG_SESSION_MS` for no terminal of that name to remain. - `debug-test-stop-e2e.test.ts` calls it first, so its later "exactly one terminal" check counts only what the test itself opened. The test timeout grows by one `DEBUG_TEST_MS` to fit the wait. - No assertion is removed or loosened. A terminal that never closes still fails, now at the point that names it. ## How Do The Automated Tests Prove It Works? - Locally, `debug-test-mtp-e2e` followed by `debug-test-stop-e2e` (CI's order): 6 passing. - On this PR's Linux `debug-tests` job, the four Stop variants must pass. If an earlier suite really leaks a terminal, they fail with `every earlier debug run closed its terminal once it settled` rather than the misleading ghost count.
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.
TLDR
A cancelled Test Explorer Debug gesture no longer leaves a leftover "SharpLsp Test Debug" terminal beside the next debug run. This is the cause of the repeated Linux
debug-testsfailures (the cancelled gesture leaves no ghost terminal beside the live debug run,2 !== 1).Details
test-debug.ts:How Do The Automated Tests Prove It Works?
debug-test-stop-e2e.test.tsStop ends its host and terminal, never retries, and the next Debug starts clean (F# and C#, VSTest and MTP) asserts exactly one test-debug terminal after a pre-cancelled gesture.2 !== 1.debug-test-mtp,debug-test-stop,debug-terminal-cancelanddebug-test-debuggingsuites pass, 35 tests.test-explorer-outcomes.test.tsstill asserts that the Debug profile opens exactly one live terminal for a real run.