Skip to content

[blazor] Harden overlapping navigation lock tests - #70860

Merged
maraf merged 1 commit into
mainfrom
maraf-harden-navigationlock-overlapping-test
Nov 26, 2026
Merged

maraf merged 1 commit into
mainfrom
maraf-harden-navigationlock-overlapping-test

Conversation

@maraf

@maraf maraf commented Nov 26, 2026

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: abbb2c4f006ba24e12b83e9039add0db92c5e61e

Dimension Assessment Rationale
Change confidence 9/10 ↑ Existing readiness wait applied to the three affected tests; Server passed 60/60 repeated cases and WebAssembly passed 3/3.
↓ Linux CI has not been validated.
Diagnosis confidence 9.5/10 ↑ A controlled browser probe reproduced navigation before listener registration and observed blocking after readiness.
Evidence fit 8/10 ↑ The unchanged test reproduced the CI failure signature locally.
↓ The original CI timing was not instrumented.

[blazor] Harden overlapping navigation lock tests

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Wait for navigation locks before testing overlapping navigations.

Description

Wait for the existing navigation-lock readiness marker after enabling the lock in the PushState, programmatic navigation, and internal-link navigation tests. A navigation can otherwise precede handler registration and bypass the lock. HistoryNavigation already waits for readiness.

The unchanged PushState test reproduced the CI failure locally on repetition 12. A controlled browser probe held the checkbox event: navigation bypassed the lock in 30/30 runs before releasing it, while waiting for readiness blocked the first navigation and allowed the second in 30/30 runs. The exact ordering in the original CI incident is unconfirmed.

Validation

  • Server: all three changed tests passed 20 consecutive repetitions (60/60), plus one additional run (3/3).
  • WebAssembly: all three changed tests passed (3/3).
  • Tests ran on macOS ARM64 with Chrome for Testing. Linux/container CI and Auto render mode were not exercised.

Related to #68642 (closed quarantine issue); observed on the unrelated #70836.

Note

This PR description was generated with the assistance of GitHub Copilot.

Wait for the navigation lock to become ready before starting overlapping navigations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@maraf maraf self-assigned this Nov 26, 2026
@maraf maraf added the area-blazor Includes: Blazor, Razor Components label Nov 26, 2026
@maraf
maraf marked this pull request as ready for review November 26, 2026 15:28
@maraf
maraf requested a review from a team as a code owner November 26, 2026 15:28
Copilot AI balanced review requested due to automatic review settings November 26, 2026 15:28

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.

🟢 Approval recommended

No active review issues are identified for the change adding navigation-lock readiness waits to the overlapping-navigation E2E tests.

No open issues 🎉

What changed in this PR

Hardens Blazor’s overlapping-navigation E2E tests by waiting for navigation-lock readiness before initiating navigation, targeting the intermittent failures associated with #68642.

Changes:

  • Adds readiness waits to the PushState, programmatic-navigation, and internal-link tests.
  • Follows the existing HistoryNavigation pattern without changing runtime code or cancellation assertions.
File Description
src/​Components/​test/​E2ETest/​Tests/​RoutingTest.cs Adds readiness polling after enabling the navigation lock in three overlapping-navigation tests.

Review effort: Balanced

@maraf

maraf commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

Note

This comment was generated with the assistance of GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@maraf

maraf commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

/ba-g Failures are unrelated

The PR changes only src/Components/test/E2ETest/Tests/RoutingTest.cs. The required failure in aspnetcore-ci build 1701289 is Microsoft.AspNetCore.SignalR.Tests.HubConnectionHandlerTests.DoesNotWritePingMessagesIfSufficientOtherMessagesAreSent in untouched SignalR test code; it counted 51 messages against an upper bound of 50. The same test has also failed on main (build 1700145). The Blazor E2E suite passed; its separate quarantined-test failure is tracked by #66118 and is outside this PR’s changed test.

Note

This comment was generated with the assistance of GitHub Copilot.

@maraf
maraf merged commit e68a8cf into main Nov 26, 2026
38 of 40 checks passed
@maraf
maraf deleted the maraf-harden-navigationlock-overlapping-test branch November 26, 2026 17:03
@maraf
maraf temporarily deployed to copilot-pat-pool November 26, 2026 17:03 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 26, 2026 17:03 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 26, 2026 17:04 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 26, 2026 17:05 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 26, 2026 17:06 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 26, 2026 17:07 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 2%

No docs needed: the PR only hardens E2E navigation-lock tests (RoutingTest.cs). Confident, not an insufficient-evidence case.

Documentation surfaces considered

  • Conceptual article: Not required — Test-only change; no user-visible behavior or API change.
  • Migration guidance: Not required — No upgrade action for users.
  • Breaking change: Not required — No compatibility impact; only an E2E test file changed.

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — abbb2c4f Deployed Nov 26, 2026 by maraf via conclusion #487
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants