Repository navigation
Port BrowserConnection.acquire and the relaunch waiter test (tester-army/e2e#1621) - #2040
Merged
Merged
Conversation
…e2e#1621) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e22a1bHfM5vdMpsWNAZ
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e22a1bHfM5vdMpsWNAZ
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.
Adds a caching
BrowserConnection.AcquireAsync/DisposeAsyncto the local web launch path and ports upstream's relaunch-waiter test. A caller that joins a relaunch still in flight now goes through acquire once, and the Chromium sandbox option cannot flip between launches. Local launches inWebEnginenow go through it.Closes #1997
Upstream parity
Ported from tester-army/e2e
packages/web/src/browser-connection.ts(BrowserConnection.acquire,dispose,registerSelectorEngines) andpackages/web/tests/unit/chromium-sandbox.test.ts.acquire: reuses a connected browser, relaunches a disconnected one, waiters join an in-flight launch and re-acquire if it failed.dispose: closes the pending browser, best-effort.registerSelectorEnginesmoved intoBrowserConnectionand runs inside acquire for a local launch.IPlaywrightand an optional launch seam (the port owns its driver; .NET-only DI).LaunchLocalAsyncis now internal because the engine'sLaunchLocalseam defaults to it.Upstream tests
All of the
describe('BrowserConnection')tests are intests/E2E.Tests/ChromiumSandbox/BrowserConnectionTests.cs, now run throughAcquireAsyncas upstream does:Not ported
connectcallback ofacquirefor CDP attach: the port has no engine-level dispose hook, so each session owns its own connection and closes it. Issue: Share one browser across a worker's attempts through BrowserConnection (tester-army/e2e#1621 follow-up) #2039.Checks
Real-model tests were not run (no Copilot login in this session). No public API change, so no docs update. Built on net10.0 only (the environment has no .NET 11).
Generated by Claude Code