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

am: 789fe60dc4

Change-Id: I5a9b10bb7eab178f83d367f13f1d4bb67c5b81b3
This commit is contained in:
Vadim Tryshev
2019-05-23 11:38:51 -07:00
committed by android-build-merger
3 changed files with 4 additions and 5 deletions

View File

@@ -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",

View File

@@ -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) {

View File

@@ -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);