Meng Tim
Meng Tim

Reputation: 438

What is "IdlingResourceTimeoutException" in Espresso?

I recently using espresso to do test with my android app. But sometimes the test case passed, sometimes not. It is a very long async task takes about 30 second to finish it. When it failed, it throws me this exception:

IdlingResourceTimeoutException

So does anyone know why this happens and what is the meaning of this exception?

Upvotes: 4

Views: 2591

Answers (1)

jeprubio
jeprubio

Reputation: 18002

That must be that the asynctask takes too much time to execute.

Try changing this idling timeout using:

IdlingPolicies.setMasterPolicyTimeout(3, TimeUnit.MINUTES);
IdlingPolicies.setIdlingResourceTimeout(3, TimeUnit.MINUTES);

Upvotes: 8

Related Questions