Loading tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java +1 −7 Original line number Diff line number Diff line Loading @@ -127,18 +127,12 @@ public class StagedRollbackTest { /** * Test rollbacks of staged installs involving only apks with bad update. * Trigger rollback phase. This is expected to fail due to watchdog * rebooting the test out from under it. * Trigger rollback phase. */ @Test public void testBadApkOnly_Phase3() throws Exception { // One more crash to trigger rollback RollbackUtils.sendCrashBroadcast(TestApp.A, 1); // We expect the device to be rebooted automatically. Wait for that to happen. // 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)); } /** Loading tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; import static org.testng.Assert.assertThrows; import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; Loading Loading @@ -136,7 +135,10 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { getDevice().reboot(); runPhase("testBadApkOnly_Phase2"); assertThrows(AssertionError.class, () -> runPhase("testBadApkOnly_Phase3")); // Trigger rollback and wait for reboot to happen runPhase("testBadApkOnly_Phase3"); assertTrue(getDevice().waitForDeviceNotAvailable(TimeUnit.MINUTES.toMillis(2))); getDevice().waitForDeviceAvailable(); runPhase("testBadApkOnly_Phase4"); Loading Loading
tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java +1 −7 Original line number Diff line number Diff line Loading @@ -127,18 +127,12 @@ public class StagedRollbackTest { /** * Test rollbacks of staged installs involving only apks with bad update. * Trigger rollback phase. This is expected to fail due to watchdog * rebooting the test out from under it. * Trigger rollback phase. */ @Test public void testBadApkOnly_Phase3() throws Exception { // One more crash to trigger rollback RollbackUtils.sendCrashBroadcast(TestApp.A, 1); // We expect the device to be rebooted automatically. Wait for that to happen. // 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)); } /** Loading
tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; import static org.testng.Assert.assertThrows; import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; Loading Loading @@ -136,7 +135,10 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { getDevice().reboot(); runPhase("testBadApkOnly_Phase2"); assertThrows(AssertionError.class, () -> runPhase("testBadApkOnly_Phase3")); // Trigger rollback and wait for reboot to happen runPhase("testBadApkOnly_Phase3"); assertTrue(getDevice().waitForDeviceNotAvailable(TimeUnit.MINUTES.toMillis(2))); getDevice().waitForDeviceAvailable(); runPhase("testBadApkOnly_Phase4"); Loading