In my integration tests when doing abcast/2 to my ets cache I need to put :timer.sleep(100) in order to wait until the cache processes save or flush etc

In my live view test, how can I wait until the asynchronous code ends without putting :timer.sleep(100) after my abcast/2 every time?

MyApp.Cache.save(id)
 :timer.sleep(100)

I would prefer some setup parameter as a solution, but any suggestions is very much appreciated.