Merge "Increase PromiseIconUiTest timeout temporarily" into tm-dev

This commit is contained in:
Alex Chau
2022-03-03 10:13:21 +00:00
committed by Android (Google) Code Review
@@ -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);
}
}