Merge lp:~benji/launchpad/bug-974617-5 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Gary Poster on 2012-05-15 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15257 |
| Proposed branch: | lp:~benji/launchpad/bug-974617-5 |
| Merge into: | lp:launchpad |
| Diff against target: |
64 lines (+18/-4) 2 files modified
lib/lp/services/webapp/tests/test_error.py (+18/-1) lib/lp/testing/fixture.py (+0/-3) |
| To merge this branch: | bzr merge lp:~benji/launchpad/bug-974617-5 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gary Poster (community) | 2012-05-15 | Approve on 2012-05-15 | |
|
Review via email:
|
|||
Description of the Change
This branch is the last fix (I hope) for bug 974617 which turned out to be two race conditions. One on starting pgbouncer (which has already been fixed) and one on LP reconnecting to that restarted pgbouncer.
This branch adds a loop that retries connecting until it succeeds or times out.
Lint: this branch fixes a few lint items and is now lint-free.
Tests: there are no tests for the test changed in this branch (which makes sense) but I interactively tested by wrapping the bouncer.start() call in a thread that waited a few seconds before starting. If those few seconds were less than the timeout, the test passed, if more, the test failed so I feel good about how this works.

I asked benji about line 35--the technically superfluous urlopen--and he said it was about readability. That's fine by me, given the relative cost of that line in comparison to the test as a whole.
Thanks, Benji!