Make tests asynchronous safe.