Adding wait to test if the flake is a race condition

Test: atest getIconsPosition_afterIconRemoved_notContained
Test: postsubmit flake percentage
Bug: 288944469
Change-Id: I51253c066159fbc4d347bceff0f4017c03b01e74
This commit is contained in:
Sebastian Franco
2023-08-28 13:13:13 -07:00
parent 7c183e2987
commit 563c4384bb
@@ -621,6 +621,10 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
mLauncher.getWorkspace().verifyWorkspaceAppIconIsGone(
DUMMY_APP_NAME + " was expected to disappear after uninstall.", DUMMY_APP_NAME);
// Debug for b/288944469 I want to test if we are not waiting enough after removing
// the icon to request the list of icons again, since the items are not removed
// immediately. This should reduce the flake rate
SystemClock.sleep(500);
Map<String, Point> finalPositions =
mLauncher.getWorkspace().getWorkspaceIconsPositions();
assertThat(finalPositions).doesNotContainKey(DUMMY_APP_NAME);