Skip to content

[test-quarantine] Stabilize the async NavigationException E2E test - #68269

Open
Yuvan111 wants to merge 3 commits into
dotnet:mainfrom
Yuvan111:66118-fix-quartine-test
Open

[test-quarantine] Stabilize the async NavigationException E2E test#68269
Yuvan111 wants to merge 3 commits into
dotnet:mainfrom
Yuvan111:66118-fix-quartine-test

Conversation

@Yuvan111

@Yuvan111 Yuvan111 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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 up to 10 seconds 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

  • Ran NavigationException_InAsyncContext_DoesNotBecomeUnobservedTaskException 100 consecutive times successfully.
  • Ran the complete RedirectionTest class 50 consecutive times successfully.
  • Addressed the most likely timing race by waiting for the counter to appear and allowing the final render cycles to settle before asserting.

Changes

  • Waits for the unobserved exception counter to appear.
  • Allows the final render cycles to complete before asserting.
  • Removes the test from quarantine.

Fixes #66118

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 7, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @Yuvan111. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Yuvan111
Yuvan111 marked this pull request as ready for review August 7, 2026 14:47
@Yuvan111
Yuvan111 requested a review from a team as a code owner August 7, 2026 14:47
Copilot AI review requested due to automatic review settings August 7, 2026 14:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 from NavigationException_InAsyncContext_DoesNotBecomeUnobservedTaskException.
  • Added an explicit wait for the unobserved-exceptions-count element before asserting its value.

Comment on lines +301 to +305
// Wait for the counter element to appear and stabilize.
// The circular redirect flow performs 3 retry attempts with multiple render cycles,
// so we need to wait for the page to fully settle before asserting.
Browser.Exists(By.Id("unobserved-exceptions-count"), TimeSpan.FromSeconds(10));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quarantine RedirectionTest.NavigationException_InAsyncContext_DoesNotBecomeUnobservedTaskException

2 participants