Increasing wait time for Launcher restart after enabling test provider
Of the the logcats indicates that Launcher gets killed eventually, but
it takes 17 sec, while the test waits for the Launcher restart to
compete in 10 sec.
Perhaps restart take longer than usual because the system is still busy
killing setup wizard.
This is the second attempt to land this CL; the first one was reverted
because the revert author believed this breaks their tests.
This time I'm icreasing the wait from 10 to 30 (not 60) secs.
Bug: 308489613
Test: presubmit
Flag: N/A
Change-Id: I18cff219cf6ec2732ed181c970cb5315bf568cab
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index e30885b..a60dba7 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -273,11 +273,11 @@
mDevice.executeShellCommand(
"pm enable --user " + userId + " " + cn.flattenToString());
// Wait for Launcher restart after enabling test provider.
- for (int i = 0; i < 100; ++i) {
+ for (int i = 0; i < 300; ++i) {
final String currentPid = mDevice.executeShellCommand(launcherPidCommand)
.replaceAll("\\s", "");
if (!currentPid.isEmpty() && !currentPid.equals(initialPid)) break;
- if (i == 99) fail("Launcher didn't restart after enabling test provider");
+ if (i == 299) fail("Launcher didn't restart after enabling test provider");
SystemClock.sleep(100);
}
} catch (IOException e) {