diff options
author | Vadim Tryshev <vadimt@google.com> | 2018-08-23 15:05:17 -0700 |
---|---|---|
committer | Vadim Tryshev <vadimt@google.com> | 2018-08-23 15:06:37 -0700 |
commit | 98afc964614dc98e5ed6b8b22cd69155b2ba43f1 (patch) | |
tree | d849f7a94f9ae53c7088a5c83690eae9464ce6d9 /tests | |
parent | 25cb600f5004105d759d677dc3fca6c1cd374101 (diff) | |
download | android_packages_apps_Trebuchet-98afc964614dc98e5ed6b8b22cd69155b2ba43f1.tar.gz android_packages_apps_Trebuchet-98afc964614dc98e5ed6b8b22cd69155b2ba43f1.tar.bz2 android_packages_apps_Trebuchet-98afc964614dc98e5ed6b8b22cd69155b2ba43f1.zip |
Increasing wait time to populate suggested apps
Bug: 110103162
Test: ReflectionBasicUiTest
Change-Id: Iee5d4f328bdde93e6d9c2db9869314aa3a8eb00f
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java index 4e5cd907c..d45036607 100644 --- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java @@ -262,8 +262,8 @@ public abstract class AbstractLauncherUiTest { }); } - // Cannot be used between a Tapl call injecting a gesture and a tapl call expecting the - // results of that gesture because the wait can hide flakeness. + // Cannot be used in TaplTests between a Tapl call injecting a gesture and a tapl call expecting + // the results of that gesture because the wait can hide flakeness. protected boolean waitForState(LauncherState state) { return waitForLauncherCondition(launcher -> launcher.getStateManager().getState() == state); } @@ -271,12 +271,19 @@ public abstract class AbstractLauncherUiTest { // Cannot be used in TaplTests after injecting any gesture using Tapl because this can hide // flakiness. protected boolean waitForLauncherCondition(Function<Launcher, Boolean> condition) { + return waitForLauncherCondition(condition, DEFAULT_ACTIVITY_TIMEOUT); + } + + // Cannot be used in TaplTests after injecting any gesture using Tapl because this can hide + // flakiness. + protected boolean waitForLauncherCondition( + Function<Launcher, Boolean> condition, long timeout) { return Wait.atMost(new Condition() { @Override public boolean isTrue() { return getFromLauncher(condition); } - }, DEFAULT_ACTIVITY_TIMEOUT); + }, timeout); } /** |