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

Commit 789fe60d authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Reducing test wait time from 60 sec to 10 sec" into ub-launcher3-qt-dev

parents 7426d82f 40bbfbed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
        assertNotNull("OverviewTask.open returned null", task.open());
        assertTrue("Test activity didn't open from Overview", mDevice.wait(Until.hasObject(
                By.pkg(getAppPackageName()).text("TestActivity2")),
                LONG_WAIT_TIME_MS));
                DEFAULT_UI_TIMEOUT));
        executeOnLauncher(launcher -> assertTrue(
                "Launcher activity is the top activity; expecting another activity to be the top "
                        + "one",
+2 −3
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ public abstract class AbstractLauncherUiTest {

    public static final long SHORT_UI_TIMEOUT = 300;
    public static final long DEFAULT_UI_TIMEOUT = 10000;
    protected static final int LONG_WAIT_TIME_MS = 60000;
    private static final String TAG = "AbstractLauncherUiTest";
    private static int sScreenshotCount = 0;

@@ -394,7 +393,7 @@ public abstract class AbstractLauncherUiTest {
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        instrumentation.getTargetContext().startActivity(intent);
        assertTrue(packageName + " didn't start",
                mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), LONG_WAIT_TIME_MS));
                mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), DEFAULT_UI_TIMEOUT));
    }

    protected void startTestActivity(int activityNumber) {
@@ -410,7 +409,7 @@ public abstract class AbstractLauncherUiTest {
        assertTrue(packageName + " didn't start",
                mDevice.wait(
                        Until.hasObject(By.pkg(packageName).text("TestActivity" + activityNumber)),
                        LONG_WAIT_TIME_MS));
                        DEFAULT_UI_TIMEOUT));
    }

    protected static String resolveSystemApp(String category) {
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ public final class LauncherInstrumentation {
    private static final String APPS_RES_ID = "apps_view";
    private static final String OVERVIEW_RES_ID = "overview_panel";
    private static final String WIDGETS_RES_ID = "widgets_list_view";
    public static final int WAIT_TIME_MS = 60000;
    public static final int WAIT_TIME_MS = 10000;
    private static final String SYSTEMUI_PACKAGE = "com.android.systemui";

    private static WeakReference<VisibleContainer> sActiveContainer = new WeakReference<>(null);