test: remove external network dependency from browser tools - #336988
Merged
Christof Marti (chrmarti) merged 1 commit intoSep 21, 2026
Merged
Conversation
Serve a loopback HTTP fixture from the extension host instead of navigating to Google. Verify the returned page content and close all server connections after the test, retaining remote-proxy coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Christof Marti (chrmarti)
September 21, 2026 09:10
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused test change is deterministic, correctly exercises remote proxying, and cleans up its resources.
Review effort: Balanced
Findings: None
What changed in this PR
Removes an external network dependency from the browser-tools integration test while preserving remote-proxy coverage.
Changes:
- Replaces Google navigation with a loopback HTTP fixture.
- Verifies both page ID and served content.
- Ensures server connections are closed in cleanup.
| File | Description |
|---|---|
extensions/vscode-api-tests/src/singlefolder-tests/browser.tools.test.ts |
Uses a local HTTP server for deterministic browser-tool testing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Christof Marti (chrmarti)
marked this pull request as ready for review
September 21, 2026 10:22
Christof Marti (chrmarti)
enabled auto-merge (squash)
September 21, 2026 10:22
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Kyle Cutler (@kycutler)Matched files:
Joaquín Ruales (@jruales)Matched files:
|
Christof Marti (chrmarti)
added a commit
that referenced
this pull request
Sep 21, 2026
Narrow this PR to test resolver tunnel port allocation and bind-error handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sandeep Somavarapu (sandy081)
approved these changes
Sep 21, 2026
Christof Marti (chrmarti)
deleted the
chrmarti/fix-insider-browser-test-network
branch
September 21, 2026 13:37
Christof Marti (chrmarti)
added a commit
that referenced
this pull request
Sep 21, 2026
* test: make browser HTTP navigation independent of the internet Use a loopback HTTP fixture with remote forwarding and verify rendered content. Let the test resolver allocate a free tunnel port instead of assuming the adjacent port is available, and reject bind errors rather than hanging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: leave browser HTTP fixture to #336988 Narrow this PR to test resolver tunnel port allocation and bind-error handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Investigated the failed original attempts in Insider run 20260921.4 / 475409.
chat - browser tools > Open a page from the webtimed out navigating tohttps://google.com/after 30 seconds (log 2192). Replace this external dependency with a loopback HTTP server in the extension host, verify that the tool returns both a page ID and the served content, and close the server/connections infinally. The test stays enabled in remote workspaces and exercises the remote browser proxy there. No retries, timeout increases, or test skips.peer chat catalog and transcript survive a host restartfailed withResource not found(log 1951). Fix peer chat catalog migration racing with chat creation #336975 fixes the matching catalog-migration race, passed its own cross-platform Azure validation, and has now merged. That fix is not duplicated here.Also checked #331912 (remote browser proxy readiness); it does not remove this test's dependency on an external website.
Validation
chat - browser toolsintegration tests passed against installed Windows Insiders, including the new HTTP test (231 ms). Five additional isolated HTTP-test runs also passed (639-758 ms).@vscode/policy-watchernative binding; used installed Insiders rather than modifying shared native dependencies.ddfc38a8a2a(finished 2026-09-21 09:52 UTC). All seven stages passed, including Windows x64, Linux x64, and macOS arm64, with publishing/release disabled and tests enabled. The originally failing macOS arm64 Remote integration step passed; the replacement HTTP test completed in 118 ms (log 1230).