Test flaky test: Always wait for handle task to complete
am: e320cdb441
Change-Id: I18fdc1648a3b313c75dc0f2f5a7198e18c56b69d
This commit is contained in:
@@ -484,9 +484,6 @@ public class UserControllerTest {
|
|||||||
|
|
||||||
private void waitForHandlerToComplete(Handler handler, long waitTimeMs)
|
private void waitForHandlerToComplete(Handler handler, long waitTimeMs)
|
||||||
throws InterruptedException {
|
throws InterruptedException {
|
||||||
if (!handler.hasMessagesOrCallbacks()) { // if nothing queued, do not wait.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final Object lock = new Object();
|
final Object lock = new Object();
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
handler.post(() -> {
|
handler.post(() -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user