Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 563c4384 authored by Sebastian Franco's avatar Sebastian Franco
Browse files

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
parent 7c183e29
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);