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

Commit dc005a05 authored by Benedict Wong's avatar Benedict Wong
Browse files

Shorten safe mode timer in VCN test mode

This change reduces the time required to test VCN safe mode in CTS, in
order to meet the 30s CTS quality bar

Bug: 193482882
Test: atest --iterations 10 android.net.vcn.cts.VcnManagerTest
Change-Id: Ibbf7132d45a7a0e5554b74fda6b3e309ee2d9c44
parent 715ab391
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@ public class VcnGatewayConnection extends StateMachine {

    @VisibleForTesting(visibility = Visibility.PRIVATE)
    static final int SAFEMODE_TIMEOUT_SECONDS = 30;
    private static final int SAFEMODE_TIMEOUT_SECONDS_TEST_MODE = 10;

    private interface EventInfo {}

@@ -1082,7 +1083,9 @@ public class VcnGatewayConnection extends StateMachine {
                createScheduledAlarm(
                        SAFEMODE_TIMEOUT_ALARM,
                        delayedMessage,
                        TimeUnit.SECONDS.toMillis(SAFEMODE_TIMEOUT_SECONDS));
                        mVcnContext.isInTestMode()
                                ? TimeUnit.SECONDS.toMillis(SAFEMODE_TIMEOUT_SECONDS_TEST_MODE)
                                : TimeUnit.SECONDS.toMillis(SAFEMODE_TIMEOUT_SECONDS));
    }

    private void cancelSafeModeAlarm() {