Fix test flakiness

Flakiness noticed while running tests locally.

Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/
Change-Id: I805bdf840f6b8c2ae6512b01fcb910af50478d2d
This commit is contained in:
Neil Fuller
2021-11-24 13:31:10 +00:00
parent 04e056e16a
commit 83b9f52029

View File

@@ -190,6 +190,9 @@ public class TimeZoneDetectorServiceTest {
createTimeZoneConfiguration(true /* autoDetectionEnabled */);
mTimeZoneDetectorService.updateConfiguration(autoDetectEnabledConfiguration);
// The configuration update notification is asynchronous.
mTestHandler.waitForMessagesToBeProcessed();
verify(mMockContext).enforceCallingPermission(
eq(android.Manifest.permission.MANAGE_TIME_AND_ZONE_DETECTION),
anyString());