-
Notifications
You must be signed in to change notification settings - Fork 839
Description
Current behavior
Two runtime tests in Given_InputManager.cs are flaky on the Skia runtime and are currently disabled with [Ignore]:
When_DirectManipulationMultipleWithInertia_Then_RunsIndependentlyWhen_DirectManipulationMultipleWithMultipleInertia_Then_RunsIndependently
Both tests verify that ScrollViewer inertia continues running independently when a second ScrollViewer is interacted with.
Root cause
The tests use await UITestHelper.WaitForRender() (waits for 1 rendering frame) then assert that inertia has advanced the scroll offset. This is a race condition: the test's CompositionTarget.Rendering handler can resolve before the inertia processor's Rendering handler fires on the same frame, so the scroll offset hasn't been updated yet.
Additionally, even waiting for multiple frames is insufficient — inertia can complete entirely between offset captures, causing the "still running" assertions to fail (observed with WaitForRender(frameCount: 2) where the offset was 12699.99 and didn't change).
Suggested investigation
- Determine how long inertia is expected to last for the test's drag parameters (200px, 1 step, 20ms offset)
- Consider whether the test should use longer/slower drags to ensure inertia lasts long enough for multiple assertions
- Consider restructuring assertions to not depend on inertia still being active at a specific point in time
- Investigate whether
WaitForcondition-based polling can work if the drag parameters are tuned to produce longer-lasting inertia
File
src/Uno.UI.RuntimeTests/Tests/Uno_UI_Xaml_Core/Given_InputManager.cs