commit | dce603e6ce24cc4f4268a369cbb2131501e59955 | [log] [tgz] |
---|---|---|
author | Antonio Kantek <kanant@google.com> | Mon Apr 13 23:01:56 2020 -0700 |
committer | Antonio Kantek <kanant@google.com> | Tue Apr 14 14:02:53 2020 -0700 |
tree | 6c4e84f10a1ea567100f5bc1b3ab86b932df0035 | |
parent | b21c380a97b01d873fa4a2120ef244c42303e773 [diff] |
Fixing CarUserServiceTest#testOnUserLifecycleEvent_nofityListener CarUserService now invokes UserLifecycleListener in it's own handler thread. Tests needs some sort of synchronization when checking if listener's onEvent method was properly invoked. This solution uses a wrapper containing a CountdownLatch, to be used by CarUserService to notify test to proceed when onEvent is invoked. Bug: 153834987 Test: atest CarServiceUnitTest:com.android.car.user.CarUserServiceTest#testOnUserLifecycleEvent_nofityListener Test: atest CarServiceUnitTest:com.android.car.user.CarUserServiceTest#testOnUserLifecycleEvent_ensureAllListenersAreNotified Change-Id: Ia3ade1839bb97a720ddab1d506ef818b6360632a
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.