This branch uses the new service double control hooks introduced in the
previous branch to rewrite the tests which check that rate limit
exceeded retries are handled properly.
The kludge used previously to induce a retry error has been removed, and
now an additional test can also be easily added to check the behaviour
if too many rate limit retry responses are received.
So that the tests run fast, I've allowed for the Retry-After header
value to be a float (even though a real instance only assigns an int).
This means the tests can specify a really
short retry time (I used 1ms).
I've also re-added a rate limit retry test for use with the live
instance, but improved it so that it exists as soon as the first rate
limit exceeded response is received.
Affected files:
A [revision details]
M http/client.go
M identity/userpass.go
M nova/live_test.go
M nova/local_test.go
M testservices/novaservice/service.go
M testservices/novaservice/service_http.go
M testservices/service.go
Reviewers: mp+144849_ code.launchpad. net,
Message:
Please take a look.
Description:
Rewrite rate limit retry tests
This branch uses the new service double control hooks introduced in the
previous branch to rewrite the tests which check that rate limit
exceeded retries are handled properly.
The kludge used previously to induce a retry error has been removed, and
now an additional test can also be easily added to check the behaviour
if too many rate limit retry responses are received.
So that the tests run fast, I've allowed for the Retry-After header
value to be a float (even though a real instance only assigns an int).
This means the tests can specify a really
short retry time (I used 1ms).
I've also re-added a rate limit retry test for use with the live
instance, but improved it so that it exists as soon as the first rate
limit exceeded response is received.
https:/ /code.launchpad .net/~wallyworl d/goose/ rate-limit- retry-tests/ +merge/ 144849
Requires: /code.launchpad .net/~wallyworl d/goose/ control- test-doubles/ +merge/ 144838
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/7200049/
Affected files: userpass. go novaservice/ service. go novaservice/ service_ http.go service. go
A [revision details]
M http/client.go
M identity/
M nova/live_test.go
M nova/local_test.go
M testservices/
M testservices/
M testservices/