Espresso idling resource not working if long running task is started in Activity's onCreate?
- 阅读更多 关于 Espresso idling resource not working if long running task is started in Activity's onCreate?
问题 How to use espresso idling resource if long running task is started in Activity's onCreate ? I have created a custom IdlingResource and it is working fine if the long async method call is triggered by click event, but breaks whenever the it is called in Acitivty's onCreate method. Example: public void onBtnClick(){ setIdle(true); // This works fine, our tests wait until setIdle(false) is called doSomeBackgroundTask(); } public void onDone(){ setResourceIdle(false); setIdle(false); } @Override