Skip to content

Fix flaky run_in_terminal registration test - #327938

Merged
dileepyavan merged 5 commits into
mainfrom
DileepY/fix-run-in-terminal-registration-test
Jul 29, 2026
Merged

Fix flaky run_in_terminal registration test#327938
dileepyavan merged 5 commits into
mainfrom
DileepY/fix-run-in-terminal-registration-test

Conversation

@dileepyavan

Copy link
Copy Markdown
Member

The run_in_terminal tool 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 registerToolData callback 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)

Copilot AI review requested due to automatic review settings July 29, 2026 00:24
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@anthonykim1

Matched files:

  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: e096470e Current: 69fe38b7

Changed (6)

agentsVoice/voiceModeOnboarding/Voice Mode onboarding (panel)/Dark
Before After
before after
agentsVoice/voiceModeOnboarding/Voice Mode onboarding (panel)/Light
Before After
before after
agentsVoice/voiceModeOnboarding/Voice Mode onboarding (wide)/Dark
Before After
before after
agentsVoice/voiceModeOnboarding/Voice Mode onboarding (wide)/Light
Before After
before after
agentsVoice/voiceModeOnboarding/Voice Mode onboarding (narrow)/Dark
Before After
before after
agentsVoice/voiceModeOnboarding/Voice Mode onboarding (narrow)/Light
Before After
before after

@dileepyavan
dileepyavan enabled auto-merge (squash) July 29, 2026 01:41
@dileepyavan
dileepyavan merged commit c90b41e into main Jul 29, 2026
29 checks passed
@dileepyavan
dileepyavan deleted the DileepY/fix-run-in-terminal-registration-test branch July 29, 2026 06:33
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants