Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a86bcee authored by Richard Uhler's avatar Richard Uhler Committed by android-build-merger
Browse files

Increase timeout in testNativeWatchdogTriggersRollback am: 5f01cb92

am: 5a6df151

Change-Id: I6bbfa215974d24c46cd0dc0c717026ac8799bb13
parents 4371b2a0 5a6df151
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -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