Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13035)

Issue 7200049: Rewrite rate limit retry tests (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by wallyworld
Modified:
11 years, 2 months ago
Reviewers:
mp+144849
Visibility:
Public.

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/~wallyworld/goose/rate-limit-retry-tests/+merge/144849 Requires: https://code.launchpad.net/~wallyworld/goose/control-test-doubles/+merge/144838 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 8

Patch Set 2 : Rewrite rate limit retry tests #

Patch Set 3 : Rewrite rate limit retry tests #

Patch Set 4 : Rewrite rate limit retry tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -57 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M http/client.go View 1 4 chunks +14 lines, -8 lines 0 comments Download
M identity/local_test.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M identity/userpass.go View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M nova/live_test.go View 2 chunks +36 lines, -0 lines 0 comments Download
M nova/local_test.go View 1 6 chunks +50 lines, -13 lines 0 comments Download
M testservices/novaservice/service.go View 2 chunks +10 lines, -14 lines 0 comments Download
M testservices/novaservice/service_http.go View 1 4 chunks +17 lines, -16 lines 0 comments Download
M testservices/service.go View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 5
wallyworld
Please take a look.
11 years, 2 months ago (2013-01-25 05:27:35 UTC) #1
jameinel
Overall LGTM. https://codereview.appspot.com/7200049/diff/1/http/client.go File http/client.go (right): https://codereview.appspot.com/7200049/diff/1/http/client.go#newcode195 http/client.go:195: for i := 0; i <= c.maxRetries; ...
11 years, 2 months ago (2013-01-28 06:44:56 UTC) #2
wallyworld
Please take a look. https://codereview.appspot.com/7200049/diff/1/http/client.go File http/client.go (right): https://codereview.appspot.com/7200049/diff/1/http/client.go#newcode195 http/client.go:195: for i := 0; i ...
11 years, 2 months ago (2013-01-29 01:44:40 UTC) #3
jameinel
LGTM
11 years, 2 months ago (2013-01-29 11:58:48 UTC) #4
wallyworld
11 years, 2 months ago (2013-01-29 13:23:52 UTC) #5
*** Submitted:

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.

R=jameinel
CC=
https://codereview.appspot.com/7200049
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b