Fix flaky run_in_terminal registration test - #327938
Merged
Merged
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @anthonykim1Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces timing-based waits with deterministic synchronization on tool-data registration, preventing flaky terminal tool refresh tests.
Changes:
- Adds a deferred registration waiter installed before each trigger.
- Updates construction and configuration-refresh tests to await registration directly.
Show a summary per file
| File | Description |
|---|---|
runInTerminalTool.test.ts |
Replaces fixed event-loop delays with registration-aware waits. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Medium
Contributor
Screenshot ChangesBase: Changed (6) |
dmitrivMS
approved these changes
Jul 29, 2026
dileepyavan
enabled auto-merge (squash)
July 29, 2026 01:41
rzhao271
approved these changes
Jul 29, 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.
The
run_in_terminaltool registration refresh tests currently wait for a fixed number of event-loop turns. The asynchronous tool-data creation can take longer, causing intermittent failures, particularly on Windows CI.This change waits for the observable
registerToolDatacallback instead, with the waiter installed before each trigger so fast registrations cannot be missed.Tests:
npm run transpile-client./scripts/test.sh --run src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts(202 passing,105 pending)