Fixed authorization tests to properly deal with registration retries.

Review: https://reviews.apache.org/r/25516