From 6332b7d73c4981c5ba862aff4e41dcc4139597ab Mon Sep 17 00:00:00 2001 From: vadimt Date: Wed, 16 Oct 2019 17:48:43 -0700 Subject: [PATCH] Reducing the time for expected launcher initialization back to 10 sec It was temporarily raised to 60 sec. https://googleplex-android-review.git.corp.google.com/9563509 should've fixed some problems with loading time, but likely not all. We need to observe whether this test starts flaking again. testDragIcon will run only in Launcher postsubmit, and won't block merges to platform if it fails. Bug: 142514365 Change-Id: I2b9a9d043346ebda721221cefd6118a1a799501f --- tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java | 3 +++ .../com/android/launcher3/tapl/LauncherInstrumentation.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java index b8ca5ded38..1c17e34a5a 100644 --- a/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java +++ b/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java @@ -16,6 +16,7 @@ package com.android.launcher3.ui.widget; import static com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName; +import static com.android.launcher3.util.rule.TestStabilityRule.UNBUNDLED_POSTSUBMIT; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -29,6 +30,7 @@ import com.android.launcher3.tapl.Widget; import com.android.launcher3.ui.AbstractLauncherUiTest; import com.android.launcher3.ui.TestViewHelpers; import com.android.launcher3.util.rule.ShellCommandRule; +import com.android.launcher3.util.rule.TestStabilityRule.Stability; import org.junit.Rule; import org.junit.Test; @@ -46,6 +48,7 @@ public class AddWidgetTest extends AbstractLauncherUiTest { @Test @PortraitLandscape + @Stability(flavors = UNBUNDLED_POSTSUBMIT) // b/142514365 public void testDragIcon() throws Throwable { clearHomescreen(); mDevice.pressHome(); diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 321f727e7c..484cbb61c3 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -497,7 +497,7 @@ public final class LauncherInstrumentation { } public void waitForLauncherInitialized() { - for (int i = 0; i < 600; ++i) { + for (int i = 0; i < 100; ++i) { if (getTestInfo( TestProtocol.REQUEST_IS_LAUNCHER_INITIALIZED). getBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD)) {