Repository navigation
Port timeout 0 as no step deadline - #1108
Merged
Merged
Conversation
A call's Timeout of TimeSpan.Zero now sets no deadline of its own, as timeout: 0 does upstream. A negative timeout is INVALID_ARGUMENT everywhere. Also ports the page wait-for-response tests and drops three by-design Playwright gaps from the testbed tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
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 22 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. |
…RL timeout 0 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
Member
Author
|
@coderabbitai review |
Contributor
Action not completed
|
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.
A
TimeoutofTimeSpan.Zeroused to fail at once on most calls, or be refused. Now it means no deadline of its own, astimeout: 0does in Playwright: the call waits until the test timeout. This covers locator actions,WaitForAsync, locator and browser matchers,ToHaveScreenshotAsync,Screen.TreeAsync/DebugAsync,Browser.GotoAsync,WaitForResponseAsync,WaitForDownloadAsync(s), andExpect.Poll. A negative timeout is nowTestExceptionINVALID_ARGUMENTon all of them.Upstream parity
Ports e2e-inc/e2e#1554, commit d2953bb.
Ported: the code (
Time,LocatorEngine,Screen,Expect,BrowserExpect,ScreenshotCall,Poll,Browser), the tests below, the testbed gap removals (click usesZero; text-content, route?glob and select-option single option leave the testbed, listed in their headers; theExpectedToFailAsyncwrappers are gone), docs (migrate/playwright,features/assertions, API reference),SKILL.md,COMPATIBILITY.md.Partial tests (
Partial_):CheckStepTimeoutTestsrefuse-negative and phase-cap (aTimeSpancannot be NaN or infinite);LocatorEngineStepDeadlineTestsrefuse-negative;ExpectPollTeststimeout 0 outside an attempt andInsideAnAttemptTeststimeout 0 (the poll's phase is the caller's cancellation token; the port has no attempt);BrowserRouteDecisionsTeststimeout 0 (real calls, no recording operation).After #1083 merges, its
Should_work_with_no_timeout(now[Ignore]) loses theIgnore:TimeSpan.Zeroworks now. Known port difference: a bare string inSelectOptionAsyncmatches the value or the label, where upstream selects by label only on purpose; upstream's test for it is dropped from the testbed. WaitForResponse timeout errors not naming the pattern is tracked in #1068.Not ported: engine-contract "waits for the test deadline with timeout 0" and the
FixtureOperationchange (the port has no contributed fixture calls);withTimeoutinfinite-budget test (nowithTimeout);operation(0)test (nooperation); upstream'sstepTimeoutexport for engine authors, changeset, testbed README, and the reference pages config/engine/errors/expect/screen/web (the port keeps these in the pages above)..NET-only symbols:
Time.Never,Time.Unbounded(a deadline and a budget that stand for "none", safe from overflow),Time.StepDeadlineandTime.StepBudget(upstream'sstepTimeoutplusDeadline.min, as the port passes engines aTimeSpan),LocatorEngine.AssertionDeadlineFor,Browser.BudgetDeadlineand itsStepBudget(the browser needs the test deadline),PollExpectation.PollDeadline.Expect.Pollwith zero and a token that cannot end throwsINVALID_CONFIG(upstream: outside a test).Closes #1093
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK