Merge lp://qastaging/~jml/launchpad/staggering-bug-401586 into lp://qastaging/launchpad/db-devel

Proposed by Jonathan Lange
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~jml/launchpad/staggering-bug-401586
Merge into: lp://qastaging/launchpad/db-devel
Diff against target: None lines
To merge this branch: bzr merge lp://qastaging/~jml/launchpad/staggering-bug-401586
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+9046@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

This cuts down the time of notfound-traversal.txt to about one minute.

See https://lists.ubuntu.com/mailman/private/launchpad/2009-July/045128.html for details. Running through ec2test now.

Revision history for this message
Stuart Bishop (stub) wrote :

Yay.

For sure needs the full ec2 run in case we actually depend on this behavior somewhere.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/testing/layers.py'
2--- lib/canonical/testing/layers.py 2009-07-17 00:26:05 +0000
3+++ lib/canonical/testing/layers.py 2009-07-20 11:07:36 +0000
4@@ -1279,6 +1279,11 @@
5 access_logger.log(MockHTTPTask(response._response, first_line))
6 return response
7
8+ # Setting STAGGER_RETRIES makes tests like notfound-traversals.txt go
9+ # much, much faster by avoiding calls to time.sleep()
10+ cls._original_stagger_retries = zope.publisher.http.STAGGER_RETRIES
11+ zope.publisher.http.STAGGER_RETRIES = False
12+
13 PageTestLayer.orig__call__ = (
14 zope.app.testing.functional.HTTPCaller.__call__)
15 zope.app.testing.functional.HTTPCaller.__call__ = my__call__
16@@ -1290,6 +1295,7 @@
17 PageTestLayer.resetBetweenTests(True)
18 zope.app.testing.functional.HTTPCaller.__call__ = (
19 PageTestLayer.orig__call__)
20+ zope.publisher.http.STAGGER_RETRIES = cls._original_stagger_retries
21 if PageTestLayer.profiler:
22 PageTestLayer.profiler.dump_stats(
23 os.environ.get('PROFILE_PAGETESTS_REQUESTS'))

Subscribers

People subscribed via source and target branches

to status/vote changes: