Fix flaky android tests by using wait