• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Running TestCase in Thread

asrekik

Lurker
Hi,
How have a TestCase that calls an asynchronous functions. the callback of this function is called by a thread, so we can't the assert test is made in the thread, not in the testcase thread.
So how we can run the callback function in the testcase thread?
I found the same problem when this callback liked to change the UI, so the solution that i find is to run the code in the runOnUiThread.
 
Back
Top Bottom