Repository navigation
[test-quarantine] Stabilize the async NavigationException E2E test - #68269
Conversation
|
Thanks for your PR, @Yuvan111. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Pull request overview
This PR aims to de-flake the NavigationException_InAsyncContext_DoesNotBecomeUnobservedTaskException server-rendering E2E test by adding an explicit wait for the “unobserved exceptions” counter to appear after the circular redirect sequence completes, and then removing the quarantine marker once the timing race is addressed.
Changes:
- Removed the
[QuarantinedTest]attribute fromNavigationException_InAsyncContext_DoesNotBecomeUnobservedTaskException. - Added an explicit wait for the
unobserved-exceptions-countelement before asserting its value.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/Components/test/E2ETest/ServerRenderingTests/RedirectionTest.cs:304
- Passing WaitAssert.DefaultTimeout explicitly is redundant here and bypasses WaitAssert's adaptive timeout behavior (GetAdjustedTimeout shortens waits after failures). Using the overload without a timeout keeps the wait centrally configurable and honors failure-based adjustments.
Browser.Exists(By.Id("unobserved-exceptions-count"), WaitAssert.DefaultTimeout);
src/Components/test/E2ETest/ServerRenderingTests/RedirectionTest.cs:304
- The PR description says this waits up to 10 seconds, but this uses the suite default (15s by default, and configurable via E2ETestOptions). Consider updating the description to avoid confusion when diagnosing future timeouts.
Browser.Exists(By.Id("unobserved-exceptions-count"), WaitAssert.DefaultTimeout);
Stabilize the async NavigationException E2E test
Description
The circular redirect scenario performs three retry attempts across multiple render cycles. The test could assert the unobserved exception count before the page had fully settled, causing intermittent failures.
The test now explicitly waits until the element appears for the exception counter to appear and allows pending render cycles to finish before reading its value. This preserves the original assertion that navigation exceptions do not become unobserved task exceptions while making the test resilient to slower CI environments.
This change also removes the quarantine attribute because the timing-related instability is addressed.
Validation / Investigation
NavigationException_InAsyncContext_DoesNotBecomeUnobservedTaskException100 consecutive times successfully.RedirectionTestclass 50 consecutive times successfully.Changes
Fixes #66118