Test can hang if the async event isn't received, add a timeout in the test loop's wait call to prevent this.