HarlonWang / AVLoadingIndicatorView

DEPRECATED
9.75k stars 1.9k forks source link

Espresso error: AppNotIdleException #16

Closed VictorAlbertos closed 8 years ago

VictorAlbertos commented 8 years ago

Hi.

I’m having troubles using your library with ui testing provided by Espresso. If I create an instance of AVLoadingIndicatorView, the test get stuck until the next exception is thrown:

Caused by: android.support.test.espresso.AppNotIdleException: Looped for 71216 iterations over 60 SECONDS. The following Idle Conditions failed . at android.support.test.espresso.IdlingPolicy.handleTimeout(IdlingPolicy.java:61) at android.support.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:477)

It does not matter if I set the visibility of the view to View.Invisible or View.Gone before continuing the text, the error still happens.

I think the problem is related with this topic.

The library is so cool, but currently I can’t use because of this. Because if I use your view I can’t perform integration testing with Espresso. Maybe there is some workaround to prevent this behaviour… I don’t know.

Thanks!

HarlonWang commented 8 years ago

I thought this error probably was Espresso to support test infinite animations not well. I noticed Espresso setup instructions

qq 20151218120325

Then I test it use Espresso without AVLoadingIndicatorView:

qq 20151218120659

qq 20151218120708

qq 20151218120711

it's same error:AppNotIdleException

I didn't used Espresso before,Maybe I guess wrong. I will check this error again when I'm free.And Also hope you can provide more details about this.