Fix flakey test that depended on threads
Fix flakey test that depended on threads

This rewrites the test to check the underlying behaviour, which is
that we retry a request for a specific kind of error.

alphagov/router-api,alphagov/router-api