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

Commit 21f33661 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a flakey test

Since the test could be off the UI thread, cancelling
would not be synchronized properly.

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationInflaterTest.java
Change-Id: Icfb02b637b76cdfb853c88130eabddf75203909b
Fixes: 65031224
parent 406042a5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -185,7 +185,9 @@ public class NotificationInflaterTest extends SysuiTestCase {
        countDownLatch.await();
    }

    /* Cancelling requires us to be on the UI thread otherwise we might have a race */
    @Test
    @UiThreadTest
    public void testSupersedesExistingTask() throws Exception {
        mNotificationInflater.inflateNotificationViews();
        mNotificationInflater.setIsLowPriority(true);