launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #09549
[Merge] lp:~gary/launchpad/bug974617take547 into lp:launchpad
Gary Poster has proposed merging lp:~gary/launchpad/bug974617take547 into lp:launchpad.
Requested reviews:
Benji York (benji): code
For more details, see:
https://code.launchpad.net/~gary/launchpad/bug974617take547/+merge/113281
Try a different approach for bug 974617 and friends.
It turns out that, when we fail these days, we fail (at least part of the time) because of instances of bug 504291. That one is still not resolved, so we are trying to liberally apply the workaround recommended there. If this seems to work, we can try and narrow down the necessary changes.
--
https://code.launchpad.net/~gary/launchpad/bug974617take547/+merge/113281
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/services/webapp/tests/test_error.py'
--- lib/lp/services/webapp/tests/test_error.py 2012-06-29 08:40:05 +0000
+++ lib/lp/services/webapp/tests/test_error.py 2012-07-03 19:19:28 +0000
@@ -67,7 +67,7 @@
else:
self.fail("We should have gotten an HTTP error")
- def retryConnection(self, url, retries=180):
+ def retryConnection(self, url, retries=60):
"""Retry to connect to *url* for *retries* times.
Return the file-like object returned by *urllib2.urlopen(url)*.
@@ -89,7 +89,17 @@
# Test setup.
self.useFixture(Urllib2Fixture())
bouncer = PGBouncerFixture()
+ # XXX gary bug=974617, bug=1011847, bug=504291 2011-07-03:
+ # In parallel tests, we are rarely encountering instances of
+ # bug 504291 while running this test. These cause the tests
+ # to fail entirely (the store.rollback() described in comment
+ # 11 does not fix the insane state) despite nultiple retries.
+ # As mentioned in that bug, we are trying aborts to see if they
+ # eliminate the problem. If this works, we can find which of
+ # these two aborts are actually needed.
+ transaction.abort()
self.useFixture(bouncer)
+ transaction.abort()
# Verify things are working initially.
url = 'http://launchpad.dev/'
self.retryConnection(url)
@@ -124,6 +134,14 @@
# Test setup.
self.useFixture(Urllib2Fixture())
bouncer = PGBouncerFixture()
+ # XXX gary bug=974617, bug=1011847, bug=504291 2011-07-03:
+ # In parallel tests, we are rarely encountering instances of
+ # bug 504291 while running this test. These cause the tests
+ # to fail entirely (the store.rollback() described in comment
+ # 11 does not fix the insane state) despite nultiple retries.
+ # As mentioned in that bug, we are trying aborts to see if they
+ # eliminate the problem.
+ transaction.abort()
self.useFixture(bouncer)
# This is necessary to avoid confusing PG after the stopped bouncer.
transaction.abort()
Follow ups