diff options
author | Roshan Pius <rpius@google.com> | 2019-09-17 14:51:09 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2019-09-19 20:41:32 -0700 |
commit | f145e1732e2db55007e338b8b64b7dd9497d1988 (patch) | |
tree | dbeb8c1e688d112cf74b664c9e5d9628b70d2166 /rs/java/android/renderscript/ProgramStore.java | |
parent | c3b87926fbbfd2164991725553ae8d676e94de0d (diff) |
TestLooper: Some changes to test looper behavior
a) Add a new stopAutoDispatchAndIgnoreExceptions method
This method ignores exceptions raised when there are no messages
dispatched in the looper. Helps write negative unit tests for methods where
the runnables are not posted when some preconditions are not met.
Not starting the looper in these tests would make it
unclear whether the test failed because the looper was not running or
because the preconditions (like permission checks) where not satisfied.
b) Auto dispatch will only stop running when stopAutoDispatch is
invoked. Previously it stops running when it runs a single message. This
causes failures in unit tests for methods which posts multiple runnables
in the same method.
Bug: 138403307
Bug: 117601161
Test: atest com.android.server.wifi
Change-Id: Iab27d92d443c6d7364c52b86d51dd2cb7902358a
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions