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

Commit 7672ebea authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Sleep in between calls to NoMan service in test" into rvc-dev am: 4afa50f2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11988033

Change-Id: I8acad576b61eb412f76c85d26d8a77fd326a6b6c
parents 54639061 4afa50f2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1339,14 +1339,15 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
    }

    @Test
    @Ignore
    public void testPostCancelPostNotifiesListeners() throws Exception {
        // WHEN a notification is posted
        final StatusBarNotification sbn = generateNotificationRecord(null).getSbn();
        mBinderService.enqueueNotificationWithTag(PKG, PKG, "tag", sbn.getId(),
                sbn.getNotification(), sbn.getUserId());
        Thread.sleep(1);  // make sure the system clock advances before the next step
        // THEN it is canceled
        mBinderService.cancelNotificationWithTag(PKG, PKG, "tag", sbn.getId(), sbn.getUserId());
        Thread.sleep(1);  // here too
        // THEN it is posted again (before the cancel has a chance to finish)
        mBinderService.enqueueNotificationWithTag(PKG, PKG, "tag", sbn.getId(),
                sbn.getNotification(), sbn.getUserId());