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
Loading
Please register or sign in to comment