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

Commit ba161b73 authored by vadimt's avatar vadimt Committed by Vadim Tryshev
Browse files

Increasing wait time for end-action events.

This is supposed to fix a flake in one of widgets tests.

The end-scroll event is posted by the system server to another thread
may arrive in ~13 sec.

The delay may have been caused by the previous test that just created
and deleted a user, so the system is busy with processing that.

Bug: 160238801
Change-Id: I43d0804252202ae04c731f35fb219c4be4bd4a76
parent 75bf867d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ public final class LauncherInstrumentation {
    private static final String WIDGETS_RES_ID = "widgets_list_view";
    private static final String CONTEXT_MENU_RES_ID = "deep_shortcuts_container";
    public static final int WAIT_TIME_MS = 10000;
    public static final int LONG_WAIT_TIME_MS = 60000;
    private static final String SYSTEMUI_PACKAGE = "com.android.systemui";

    private static WeakReference<VisibleContainer> sActiveContainer = new WeakReference<>(null);
@@ -638,7 +639,7 @@ public final class LauncherInstrumentation {
            Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "executeAndWaitForEvent: before");
            final AccessibilityEvent event =
                    mInstrumentation.getUiAutomation().executeAndWaitForEvent(
                            command, eventFilter, WAIT_TIME_MS);
                            command, eventFilter, LONG_WAIT_TIME_MS);
            Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "executeAndWaitForEvent: after");
            assertNotNull("executeAndWaitForEvent returned null (this can't happen)", event);
            final Parcelable parcelableData = event.getParcelableData();