Wait longer for configuration change
Configuration changes can take > 50 ms. But currently, we are only waiting for 50 ms. If the cloud device is remote, it can be slow, so the current timeout is not sufficient. Extend the timeout for the cases where we expect the event to happen. At the same time, we don't need to wait for a long time to check that an event did not happen. Most of the time, the device is fast. On average, the event happens within 14 ms, with a standard deviation of 4.6 ms. Therefore, if we wait for 30 ms for an event to not happen, and the code is faulty, then the test is highly likely to fail. This would ensure that we don't encounter too many flakes, and the test will be mostly red if the code is faulty. Bug: 149155998 Test: tested on a remote cloud device (which is slow) Test: /data/nativetest/inputflinger_tests/inputflinger_tests --gtest_repeat=100 Change-Id: Ibd5ec86ef17ff6fac1d115a3fcc337fed7b20ae5
Loading
Please register or sign in to comment