0

I have Espresso test which has a lot of Eventbus posts in the implementation of the code which is being tested. I get random fails because of this asynchronous part. Is there any idea how to force Espresso to wait for this callback executions?

X-HuMan
  • 1,488
  • 1
  • 17
  • 37

1 Answers1

0

You need to implement your own Espresso IdlingResource to deal with these asynchronous events.

Answer from this question: how to make assert to wait for IdlingResource to assert might be useful.

Hope it will help

Community
  • 1
  • 1
piotrek1543
  • 19,130
  • 7
  • 81
  • 94