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

Commit f0b9e423 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Reduce flakiness in IME Swithcer menu test

This changes the final assertion of
testImeSwitcherMenu_openLanguageSettings from verifing once to retrying
a few times until passing. When opening the Language Settings the menu
will be dismissed, but there might be a delay between this and the first
time we check the assertion.

Flag: EXEMPT testfix
Bug: 421359220
Test: atest InputMethodServiceTest#testImeSwitcherMenu_openLanguageSettings
Change-Id: I004fac212ed8c0e90291f0890d53da21a9c9692f
parent 7713d255
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1061,8 +1061,9 @@ public class InputMethodServiceTest {
                            .and(WindowManagerStateHelper::activityWindowFocused),
                    "Language settings activity should have the focused window");

            eventually(() ->
                    assertWithMessage("Input Method Switcher Menu should no longer be shown")
                    .that(isInputMethodPickerShown(mImm)).isFalse();
                            .that(isInputMethodPickerShown(mImm)).isFalse());
        }
    }