summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Richard Uhler <ruhler@google.com> 2019-11-25 05:36:26 -0800
committer android-build-merger <android-build-merger@google.com> 2019-11-25 05:36:26 -0800
commit5a6df15108985d1aa1d67cc97aa54458f187927d (patch)
tree367b3c56f41630f834b9c0ff051efc3dfa9338ae
parent79e8fcb4ae72e9fdff5b44add5ef4e3c31099f3a (diff)
parent5f01cb924615336a5ea5cf2289cfd44ecb821516 (diff)
Increase timeout in testNativeWatchdogTriggersRollback
am: 5f01cb9246 Change-Id: I4677f053787074ef445bba8d18ace8ad66c711ff
-rw-r--r--tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java14
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 fb5534549e9b..a590fc4e28d5 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
@@ -30,6 +30,8 @@ import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.concurrent.TimeUnit;
+
/**
* Runs the staged rollback tests.
*/
@@ -102,9 +104,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