test: fix resolver tunnel port allocation and bind errors - #336996
Merged
Christof Marti (chrmarti) merged 2 commits intoSep 21, 2026
Merged
Conversation
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>
Copilot started reviewing on behalf of
Christof Marti (chrmarti)
September 21, 2026 09:43
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused changes correctly address the reported test instability without introducing unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Stabilizes browser HTTP navigation tests by replacing an external dependency with a local fixture and improving test-resolver tunnel allocation and failure handling.
Changes:
- Uses an ephemeral loopback HTTP fixture with remote forwarding.
- Allocates OS-selected tunnel ports and rejects bind failures.
- Ensures browser, tunnel, server, and connection cleanup.
| File | Description |
|---|---|
extensions/vscode-test-resolver/src/extension.ts |
Improves tunnel port selection and bind-error handling. |
extensions/vscode-api-tests/src/singlefolder-tests/browser.tools.test.ts |
Adds deterministic HTTP navigation coverage and robust cleanup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
Base:
|
Narrow this PR to test resolver tunnel port allocation and bind-error handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Christof Marti (chrmarti)
marked this pull request as ready for review
September 21, 2026 10:57
Christof Marti (chrmarti)
enabled auto-merge (squash)
September 21, 2026 10:57
Henning Dieterichs (hediet)
approved these changes
Sep 21, 2026
Christof Marti (chrmarti)
deleted the
chrmarti/fix-browser-tools-http-fixture
branch
September 21, 2026 14:23
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
Narrowed to the test resolver only. The browser-tools HTTP fixture is handled independently by #336988; this PR no longer changes that test.
remotePort + 1is available. The adjacent port can be occupied or reserved on Windows, and remote port 65535 would otherwise produce an invalid local port.This addresses the resolver failure behind the rollback in #336381. It is not an additional failure established in Azure build 475409, and #336988 does not require this change because it uses the browser remote proxy without explicitly opening a tunnel.
Validation
git diff --checkpass.EADDRINUSE.ec5a082570d, validated by Azure build 475477: succeeded, with all Electron and Remote integration jobs passing on Windows x64, Linux x64, and macOS ARM64. That revision still included the now-removed HTTP fixture, which explicitly exercised tunnel creation in remote tests.