diff options
| author | 2019-09-05 18:13:06 +0000 | |
|---|---|---|
| committer | 2019-09-05 18:13:06 +0000 | |
| commit | d71c07d052142c2d7d37b9b9263003965e25258e (patch) | |
| tree | 326a28f464de21731e5e8d0ba5db85db5c378dad | |
| parent | 089ad6c0a5dd716d9a629338a99351cd006f5df2 (diff) | |
| parent | 56d58a049344e3c753356942b3970787f7138745 (diff) | |
Merge "Increase timeout in testNativeWatchdogTriggersRollback"
| -rw-r--r-- | tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java b/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java index b2e5a62849e7..bc98f06ebc56 100644 --- a/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java +++ b/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java @@ -28,6 +28,8 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import java.util.concurrent.TimeUnit; + /** * Runs the staged rollback tests. */ @@ -99,9 +101,15 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { // crash system_server enough times to trigger a rollback crashProcess("system_server", NATIVE_CRASHES_THRESHOLD); - // Rollback should be committed automatically now - // Give time for rollback to be committed - assertTrue(getDevice().waitForDeviceNotAvailable(60000)); + // Rollback should be committed automatically now. + // Give time for rollback to be committed. This could take a while, + // because we need all of the following to happen: + // 1. system_server comes back up and boot completes. + // 2. Rollback health observer detects updatable crashing signal. + // 3. Staged rollback session becomes ready. + // 4. Device actually reboots. + // So we give a generous timeout here. + assertTrue(getDevice().waitForDeviceNotAvailable(TimeUnit.MINUTES.toMillis(5))); getDevice().waitForDeviceAvailable(); // verify rollback committed |