Merge "Increase PromiseIconUiTest timeout temporarily" into tm-dev am: b7d5cf4c60

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17056087

Change-Id: I48d68c8a18247753316619b74ab502c73a16c287
This commit is contained in:
Alex Chau
2022-03-03 10:20:23 +00:00
committed by Automerger Merge Worker
@@ -34,6 +34,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
/**
@@ -44,6 +45,8 @@ import java.util.UUID;
public class PromiseIconUiTest extends AbstractLauncherUiTest {
private int mSessionId = -1;
// TODO(b/202985412): Revert to default timeout when PackageManager bug is fixed.
private static final long PROMISE_ICON_TIMEOUT = TimeUnit.SECONDS.toMillis(60);
@Override
public void setUp() throws Exception {
@@ -85,7 +88,8 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest {
// Verify promise icon is added
waitForLauncherCondition("Test Promise App not found on workspace", launcher ->
launcher.getWorkspace().getFirstMatch(findPromiseApp) != null);
launcher.getWorkspace().getFirstMatch(findPromiseApp) != null,
PROMISE_ICON_TIMEOUT);
// Remove session
mTargetContext.getPackageManager().getPackageInstaller().abandonSession(mSessionId);
@@ -93,7 +97,8 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest {
// Verify promise icon is removed
waitForLauncherCondition("Test Promise App not removed from workspace", launcher ->
launcher.getWorkspace().getFirstMatch(findPromiseApp) == null);
launcher.getWorkspace().getFirstMatch(findPromiseApp) == null,
PROMISE_ICON_TIMEOUT);
}
@Test
@@ -111,6 +116,7 @@ public class PromiseIconUiTest extends AbstractLauncherUiTest {
// Verify promise icon is not added
waitForLauncherCondition("Test Promise App not found on workspace", launcher ->
launcher.getWorkspace().getFirstMatch(findPromiseApp) == null);
launcher.getWorkspace().getFirstMatch(findPromiseApp) == null,
PROMISE_ICON_TIMEOUT);
}
}