diff options
author | Kweku Adams <kwekua@google.com> | 2019-02-28 13:53:21 -0800 |
---|---|---|
committer | Kweku Adams <kwekua@google.com> | 2019-02-28 14:31:04 -0800 |
commit | 374719b8d717b2952caeebda9cd1da8f0382c158 (patch) | |
tree | bcb48db2e81230e6d69180845d8a8f6926bc7b6b /rs/java/android/renderscript/ProgramStore.java | |
parent | 6dabb47132d6ce169a8592a209556a5791eb84d3 (diff) |
Fixing flakiness of AppStandbyController test.
Since AppStandbyController uses a handler to notify listeners of a state change,
there is some inherent latency between changing the state and getting the
notification. testEnabledState needs to wait until the paroleListener has
been notified that parole is on before continuing with the test.
In order to test this, I added Thread.sleep(27) to
informParoleStateChanged. Without this change, the test fails every few
iterations. With the change, the test doesn't fail.
Bug: 119774928
Test: for i in `seq 10`; do atest com.android.server.usage.AppStandbyControllerTests#testEnabledState; done
Change-Id: Ic5c7313d6bca18c966837ba357615aa4619edec6
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions