Repository navigation
Stabilize and Unquarantine VirtualizationTest.ScrollToItem_AfterEndJump_LandsAtTarget - #69379
Conversation
|
Thanks for your PR, @irfanajaffer. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Remove the quarantine attribute so the stabilized test runs normally.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Stabilizes the virtualization E2E test by waiting for rendering to settle after End-key navigation.
Changes:
- Adds synchronization before scrolling to item 200.
| File | Summary |
|---|---|
src/Components/test/E2ETest/Tests/VirtualizationTest.cs |
Adds render-settling synchronization, but the test remains quarantined. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
What are the failures observed on CI? What error message and in what line did we see? It would be good to attach it to prove the failing line is the one that is being stabilized. |
Thanks for the feedback. I reviewed the CI evidence associated with #68644. The available CI logs do not expose the intermediate virtualization state, so we cannot directly prove the race condition from the failure data alone. However, all recorded failures occurred at the assertion validating the result of ScrollToItemAsync(200):
The added WaitForRenderToSettle(container, js) is intentionally placed at the only asynchronous transition between the successful End-key navigation validation and the failing assertion. While this does not conclusively prove the underlying cause, it eliminates the possibility that ScrollToItemAsync(200) begins while virtualization updates triggered by the End-key navigation are still being processed. I've also updated the PR description to clarify the observed failure point, the rationale for the additional synchronization, and the distinction between the CI evidence and the hypothesis behind the stabilization approach. |
By how many pixels? Is there any pattern in the difference between the target and reality? |
Ah, it's only boolean, it won't tell us. Can you maybe change this line to log the diff if the assert fails? There are asserts with messages. In case the line you're adding won't be enough we will have more info the next time we visit this problem. |
Report the actual top item, index delta, and scroll offset if the stabilized assertion fails again. Co-authored-by: Copilot <[email protected]>
Record the last observed top item, index delta, and scroll offset when the stabilized assertion times out. Co-authored-by: Copilot <[email protected]>
|
Addressed in 3b01d71. The final assertion now captures the last values observed by the polling loop and reports:
The historical CI failures only recorded I also rebuilt the Components E2E project and reran the targeted Selenium test after this change: 2 passed, 0 failed, 0 skipped. |
Please, try to apply the smallest changes possible and use the hints from the review. Try-catch with rethrow is a hammer solution. - Browser.True(() => GetTopRenderedIndex(js) == targetIndex);
+ Browser.True(() => GetTopRenderedIndex(js) == targetIndex,
+ $"Top rendered item should be {targetIndex} but was {GetTopRenderedIndex(js)} " +
+ $"(index delta: {GetTopRenderedIndex(js) - targetIndex}), scrollTop={GetScrollTop(js, container)}."); |
Use the existing Browser.True message overload as suggested in review. Co-authored-by: Copilot <[email protected]>
|
You're right; I over-engineered this instead of using the existing assertion overload you pointed to. I replaced the try/catch and rethrow with the exact minimal Validation after the change:
|

Description
This PR stabilizes and unquarantines
VirtualizationTest.ScrollToItem_AfterEndJump_LandsAtTarget.The test navigates to the end of a virtualized list and then invokes
ScrollToItemAsync(200). The existing check for item 999 only proves that thelast item was rendered; it does not prove that the render count, scroll position,
and first rendered item resulting from the End-key operation have settled.
This change adds
WaitForRenderToSettle(container, js)after the End-keynavigation and before starting the scroll-to-item operation. It also improves
the final assertion diagnostics and removes the quarantine attribute.
No product code or framework behavior is changed.
CI failure evidence
Issue #68644 captured four failures during its 30-day observation window:
1558260,15557781553376,1557499All four failures reported:
The stack trace pointed to
VirtualizationTest.ScrollToItem_AfterEndJump_LandsAtTarget()at line 5539 ofthe source revision used by those CI runs. That line was:
This shows that the top rendered item did not reach the target index within the
assertion timeout. The old boolean-only assertion did not record the actual
index or pixel offset, so the historical failures cannot be used to calculate a
pixel difference or identify a consistent offset pattern.
The assertion now records the last observed top rendered index, its difference
from the target index, and
scrollTopif the failure recurs.Validation
ScrollToItem_AfterEndJump_LandsAtTarget100 consecutive timeslocally during the initial investigation; all iterations passed.
Changes
WaitForRenderToSettle(container, js)after End-key navigation.scrollTop.[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/68644")].Fixes #68644