Reputation: 438
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
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