Skip to content

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

Merged
ilonatommy merged 11 commits into
dotnet:mainfrom
Yuvan111:66118-fix-quartine-test
Aug 17, 2026
Merged

ilonatommy merged 11 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 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

  • 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.

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

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);

@kotlarmilos kotlarmilos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@ilonatommy
ilonatommy enabled auto-merge (squash) August 14, 2026 10:07
@ilonatommy
ilonatommy merged commit 035fcf7 into dotnet:main Aug 17, 2026
29 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components community-contribution Indicates that the PR has been added by a community member test-failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quarantine RedirectionTest.NavigationException_InAsyncContext_DoesNotBecomeUnobservedTaskException

5 participants