Skip to content

Stabilize Virtualize cancellation test case - #69168

Merged
ilonatommy merged 4 commits into
dotnet:mainfrom
Yuvan111:fix-68852-vritualise-cancel-test
Sep 9, 2026
Merged

Stabilize Virtualize cancellation test case#69168
ilonatommy merged 4 commits into
dotnet:mainfrom
Yuvan111:fix-68852-vritualise-cancel-test

Conversation

@Yuvan111

@Yuvan111 Yuvan111 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Stabilize Virtualize cancellation test case

Description

Stabilizes ScrollToIndexAsync_CancellationCancelsProviderRequest by removing the timeout-prone TaskCompletionSource rendezvous.

The provider now captures its cancellation token and triggers cancellation directly. This guarantees cancellation occurs only after the provider request has started, while still verifying that cancellation propagates to the in-flight provider request.

Fixes #68852

Testing

  • Built Microsoft.AspNetCore.Components.Web.Tests
  • Ran the targeted test successfully
  • Ran the targeted test 100 times in a loop with zero failures
  • Verified no diagnostics or whitespace errors

The original intermittent failure was not reproduced locally. Validation is based on structurally eliminating the reported timeout-prone synchronization boundary, with repeated execution as supporting evidence.

@github-actions github-actions Bot added the area-blazor Includes: Blazor, Razor Components label Sep 9, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Sep 9, 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 September 9, 2026 11:20
@Yuvan111
Yuvan111 requested a review from a team as a code owner September 9, 2026 11:20
Copilot AI lite review requested due to automatic review settings September 9, 2026 11:20

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

The change is isolated to test code, aligns with the stated stabilization goal, and preserves the core verification that cancellation propagates to the in-flight provider request.

Pull request overview

This pull request stabilizes the quarantined VirtualizeTest.ScrollToIndexAsync_CancellationCancelsProviderRequest test by removing a timeout-prone TaskCompletionSource “request started” rendezvous and instead initiating cancellation directly from inside the items provider once the provider request has definitively begun.

Changes:

  • Replaced the TaskCompletionSource start/cancel coordination with a provider-captured cancellation token and in-provider CancellationTokenSource.Cancel() trigger.
  • Simplified the assertion to verify the provider request’s cancellation token is observed as canceled.
File summaries
File Description
src/Components/Web/test/Virtualization/VirtualizeTest.cs Updates the cancellation propagation test to avoid timeout-prone synchronization and validate cancellation via the provider’s captured token.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@ilonatommy
ilonatommy enabled auto-merge (squash) September 9, 2026 11:36
@ilonatommy ilonatommy modified the milestone: .NET 12 Planning Sep 9, 2026
@ilonatommy
ilonatommy merged commit b28e99a into dotnet:main Sep 9, 2026
31 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 10, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quarantine VirtualizeTest.ScrollToIndexAsync_CancellationCancelsProviderRequest

4 participants