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: I44f9e786d2a2285475ee423e34d06f5b5a5271e1
Merged-In: Ia25561831616dd2f2644743a399b49e35d5d4ea4
diff --git a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/RollbackTest.java b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/RollbackTest.java
index 1b002ca..09a9b9b 100644
--- a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/RollbackTest.java
+++ b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/RollbackTest.java
@@ -35,7 +35,6 @@
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;
@@ -973,7 +972,7 @@
//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);