commit | d965a546f156af09d65c9976ac4ff63e569105e5 | [log] [tgz] |
---|---|---|
author | Jim Kaye <jameskaye@google.com> | Tue Feb 25 10:48:40 2020 -0800 |
committer | Jim Kaye <jameskaye@google.com> | Fri Feb 28 14:47:11 2020 -0800 |
tree | cc9f3c627c4cd2be71f7181cd43759762d3627fb | |
parent | f56ddb7d2f3b500959afa5cda8673cad6f86c32e [diff] |
[Unit test] Fix flakiness in CarPowerManagementTest Some tests require that no power transition takes place. The timeout for these tests was set the same as the timeout that cancels Garage Mode if it runs too long. When Garage Mode is canceled, a new power state is reported. These tests would pass or fail based on the order of the timeouts. Also, some tests look for a particular power state report, but want to ignore SHUTDOWN_POSTPONE reports. The code that did this check would only look at the first reported state and ignored any others. This caused flakiness based on where a reported state happend to be in the list at the time of the check. Fixes: 149837279 Fixes: 146210534 Test: Updates CarPowerManagementTest Change-Id: I9313adc049c78014e098ad8375c7196163315a39
Native (C++) code format is required to be compatible with .clang-format file. Run
git clang-format --style=file --extension='h,cpp,cc' HEAD~
Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.