Make test wait for job to finish