diff options
| -rw-r--r-- | services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java b/services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java index 079bc37b6642..2ab223d5d462 100644 --- a/services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java @@ -1412,6 +1412,9 @@ public final class BroadcastQueueModernImplTest extends BaseBroadcastQueueTest { final BroadcastRecord userPresentRecord2 = makeBroadcastRecord(userPresent); mImpl.enqueueBroadcastLocked(userPresentRecord1); + // Wait for a few ms before sending another broadcast to allow comparing the + // enqueue timestamps of these broadcasts. + SystemClock.sleep(5); mImpl.enqueueBroadcastLocked(userPresentRecord2); final BroadcastProcessQueue queue = mImpl.getProcessQueue(PACKAGE_GREEN, |