add polling to support async tests