Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 405
Meng Tim Avatar asked Sep 05 '25 17:09

Meng Tim


1 Answers

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);
like image 88
jeprubio Avatar answered Sep 09 '25 15:09

jeprubio