Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e952fe9 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Fix FlingOnBackAnimationCallbackTest flake

Bug: 390517215
Test: FlingOnBackAnimationCallbackTest
Flag: EXEMPT test-only bugfix
Change-Id: I8bd385686ed317b95cfc18ea3582ec4ea3217000
parent 03d6b1fc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -69,9 +69,11 @@ class FlingOnBackAnimationCallbackTest : SysuiTestCase() {
        callback.onBackProgressed(backEventOf(0.6f, 32))
        assertTrue("Assert onBackProgressedCompat called", callback.backProgressedCalled)
        assertEquals("Assert interpolated progress", 0.6f, callback.progressEvent?.progress)
        getInstrumentation().runOnMainSync { callback.onBackInvoked() }
        // Assert that onBackInvoked is not called immediately...
        getInstrumentation().runOnMainSync {
            callback.onBackInvoked()
            // Assert that onBackInvoked is not called immediately.
            assertFalse(callback.backInvokedCalled)
        }
        // Instead the fling animation is played and eventually onBackInvoked is called.
        callback.backInvokedLatch.await(1000, TimeUnit.MILLISECONDS)
        assertTrue(callback.backInvokedCalled)