From 81e53bd51ea3b68de2a088386f8237debcefdc6d Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 15 Jun 2015 12:33:53 -0700 Subject: Fix VoicemailPlaybackTest flakiness. Change-Id: I9568ab3236ab02125c3d7da5f8a477df34bd7499 --- tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java b/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java index dd86b0d6f..96ef62abf 100644 --- a/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java +++ b/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java @@ -109,6 +109,7 @@ public class VoicemailPlaybackTest extends InstrumentationTestCase { // There is a background check that is testing to see if we have the content available. // Once that task completes, we shouldn't be showing the fetching message. mFakeAsyncTaskExecutor.runTask(CHECK_FOR_CONTENT); + getInstrumentation().waitForIdleSync(); assertHasOneTextViewContaining("Buffering"); assertHasZeroTextViewsContaining("Loading voicemail"); @@ -119,6 +120,7 @@ public class VoicemailPlaybackTest extends InstrumentationTestCase { setPlaybackViewForPresenter(); mFakeAsyncTaskExecutor.runTask(CHECK_FOR_CONTENT); + getInstrumentation().waitForIdleSync(); // The media player will have thrown an IOException since the file doesn't exist. // This should have put a failed to play message on screen, buffering is gone. -- cgit v1.2.3