diff options
| author | 2019-11-06 23:12:06 +0000 | |
|---|---|---|
| committer | 2019-11-06 23:12:06 +0000 | |
| commit | 8c6640f37da58fa67f733dfefbdec217e6309138 (patch) | |
| tree | 7e2aac7ca9fe34746cd9ccabb376307b52cd4684 | |
| parent | 2670fcafd7f562e6dd867c883c26c46b58e19314 (diff) | |
| parent | 887b2574a2b3388eea5243d9e30dd0ec88617b74 (diff) | |
Merge changes Icf3a5583,Idd0fd1cc
* changes:
Increase sleep timeout of testNetworkFailedRollback_Phase3 (4/n)
Do a reboot before starting each test (3/n)
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java index 8f36b6e95c32..06be5e2a0b9d 100644 --- a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java +++ b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java @@ -251,11 +251,11 @@ public class StagedRollbackTest { @Test public void testNetworkFailedRollback_Phase3() throws Exception { - // Sleep for > health check deadline + // Sleep for > health check deadline (120s to trigger rollback + 120s to reboot) // The device is expected to reboot during sleeping. This device method will fail and // the host will catch the assertion. If reboot doesn't happen, the host will fail the // assertion. - Thread.sleep(TimeUnit.SECONDS.toMillis(120)); + Thread.sleep(TimeUnit.SECONDS.toMillis(240)); } @Test 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 bfd5dd5a33de..557d498ce8ee 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 @@ -22,6 +22,7 @@ import static org.testng.Assert.assertThrows; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test; +import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -47,6 +48,11 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { phase)); } + @Before + public void setUp() throws Exception { + getDevice().reboot(); + } + /** * Tests watchdog triggered staged rollbacks involving only apks. */ |