diff options
| author | 2020-08-12 14:06:28 -0700 | |
|---|---|---|
| committer | 2020-08-12 21:32:29 +0000 | |
| commit | 7c6faa107bec10c1d9921888ecdd11c2ce4b1492 (patch) | |
| tree | e357c0de19a538d98dda3222647d4a2b4b33a54d | |
| parent | 5d650722cb764e7427b8548c275990dc8bcb85c9 (diff) | |
Extend wait time for AppStandbyController Sync Scheduled tests
This should get rid of flaky test failures on a slow running test
device.
Bug: 150534040
Test: atest AppStandbyControllerTests
Change-Id: I65e2383ad9bb9b61c3e84c909d8b5d329621681c
| -rw-r--r-- | services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java index 4dec7a1a0ab9..7c7b1a296673 100644 --- a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java +++ b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java @@ -1383,7 +1383,7 @@ public class AppStandbyControllerTests { getStandbyBucket(mController, PACKAGE_1)); mController.postReportSyncScheduled(PACKAGE_1, USER_ID, false); - mStateChangedLatch.await(100, TimeUnit.MILLISECONDS); + mStateChangedLatch.await(1000, TimeUnit.MILLISECONDS); assertEquals("Unexempted sync scheduled should bring the package out of the Never bucket", STANDBY_BUCKET_WORKING_SET, getStandbyBucket(mController, PACKAGE_1)); @@ -1391,7 +1391,7 @@ public class AppStandbyControllerTests { mStateChangedLatch = new CountDownLatch(1); mController.postReportSyncScheduled(PACKAGE_1, USER_ID, false); - mStateChangedLatch.await(100, TimeUnit.MILLISECONDS); + mStateChangedLatch.await(1000, TimeUnit.MILLISECONDS); assertEquals("Unexempted sync scheduled should not elevate a non Never bucket", STANDBY_BUCKET_RARE, getStandbyBucket(mController, PACKAGE_1)); } @@ -1402,7 +1402,7 @@ public class AppStandbyControllerTests { mInjector.mDeviceIdleMode = true; mStateChangedLatch = new CountDownLatch(1); mController.postReportSyncScheduled(PACKAGE_1, USER_ID, true); - mStateChangedLatch.await(100, TimeUnit.MILLISECONDS); + mStateChangedLatch.await(1000, TimeUnit.MILLISECONDS); assertEquals("Exempted sync scheduled in doze should set bucket to working set", STANDBY_BUCKET_WORKING_SET, getStandbyBucket(mController, PACKAGE_1)); @@ -1410,7 +1410,7 @@ public class AppStandbyControllerTests { mInjector.mDeviceIdleMode = false; mStateChangedLatch = new CountDownLatch(1); mController.postReportSyncScheduled(PACKAGE_1, USER_ID, true); - mStateChangedLatch.await(100, TimeUnit.MILLISECONDS); + mStateChangedLatch.await(1000, TimeUnit.MILLISECONDS); assertEquals("Exempted sync scheduled while not in doze should set bucket to active", STANDBY_BUCKET_ACTIVE, getStandbyBucket(mController, PACKAGE_1)); } |