From 98afc964614dc98e5ed6b8b22cd69155b2ba43f1 Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Thu, 23 Aug 2018 15:05:17 -0700 Subject: Increasing wait time to populate suggested apps Bug: 110103162 Test: ReflectionBasicUiTest Change-Id: Iee5d4f328bdde93e6d9c2db9869314aa3a8eb00f --- .../com/android/launcher3/ui/AbstractLauncherUiTest.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tests') 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 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 condition, long timeout) { return Wait.atMost(new Condition() { @Override public boolean isTrue() { return getFromLauncher(condition); } - }, DEFAULT_ACTIVITY_TIMEOUT); + }, timeout); } /** -- cgit v1.2.3