diff options
| author | 2019-09-02 06:45:04 +0000 | |
|---|---|---|
| committer | 2019-09-05 10:41:46 +0800 | |
| commit | 8c89ae56266d8357e1ef2cf5b9b084ee946c0fb9 (patch) | |
| tree | b2152fbb887c2cb910c6459889c6ddfee0bc7bcd /services/coverage/java | |
| parent | 82bbb6525ea2dc4ea660da4f7cceb30bc0280ed1 (diff) | |
Replace Thread.sleep() with TestLooper.moveTimeForward()
TestLooper.moveTimeForward() changes the target delivery time of the messages
in the queue to simulate elapsed time. This allows tests to run faster in a
more deterministic way without incurring the indeterminism caused by Thread.sleep()
which is usually a source of flakiness and should be avoided when possible.
Bug: 140208026
Test: atest PackageWatchdogTest
Change-Id: I3365093838ec9fa2de5742359f6947379add7703
Diffstat (limited to 'services/coverage/java')
0 files changed, 0 insertions, 0 deletions