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

Commit efc38fd2 authored by Richard Uhler's avatar Richard Uhler
Browse files

Reduce ENABLE_ROLLBACK timeout to 0 for timeout test.

testEnableRollbackTimeoutFailsRollback works by setting the enable
rollback timeout to 1 millisecond so that we will always time out, but
the test is failing some times because apparently we enable rollback
within the 1 millisecond limit. Reduce the timeout to 0 milliseconds to
try and reduce test flakiness.

Before lowering the timeout, the test failure was easy to reproduce
locally. After lowering the timeout I have not once been able to
reproduce the test failure locally.

Bug: 134373106
Test: atest RollbackTest:com.android.tests.rollback.RollbackTest#testEnableRollbackTimeoutFailsRollback
Change-Id: Ia25561831616dd2f2644743a399b49e35d5d4ea4
parent 826f25b2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import android.content.pm.VersionedPackage;
import android.content.rollback.RollbackInfo;
import android.content.rollback.RollbackManager;
import android.provider.DeviceConfig;
import android.provider.Settings;
import android.util.Log;

import androidx.test.InstrumentationRegistry;
@@ -972,7 +971,7 @@ public class RollbackTest {
            //setting the timeout to a very short amount that will definitely be triggered
            DeviceConfig.setProperty(DeviceConfig.NAMESPACE_ROLLBACK,
                    PROPERTY_ENABLE_ROLLBACK_TIMEOUT_MILLIS,
                    Long.toString(1), false /* makeDefault*/);
                    Long.toString(0), false /* makeDefault*/);
            RollbackManager rm = RollbackTestUtils.getRollbackManager();

            RollbackTestUtils.uninstall(TEST_APP_A);