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

Skip to content
Commit d908f5a0 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Wait for dispatcher to be idle in WindowDropsInput test

This test is flaky, and the failure is not reproducible locally. This CL
attempts a speculative fix by analyzing the failure.

Diagnosis:
We are sending the events to the dispatcher via notifyMotion, but we aren't
waiting for the dispatcher long enough to process them. In the case when
the device running this test is slow, these events are still pending inside
dispatcher.

Then later in the test, we are setting the window flag to no longer drop input.
This causes the delivery of the motion event DOWN instead of the expected key
event.

In this CL, we are waiting for the dispatcher to completely process the
pending events before continuing with the test.

Bug: 311284088
Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="*WindowDropsInput" --gtest_repeat=10000 --gtest_break_on_failure
Change-Id: I24fc1bf08513f7dfc99a3a1ebfdaa66869a1b015
parent 32068950
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment