Stabilize Virtualize cancellation test case - #69168
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.
🟢 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
TaskCompletionSourcestart/cancel coordination with a provider-captured cancellation token and in-providerCancellationTokenSource.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.
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
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.