Merge lp:~wgrant/launchpad/secret-query-count-determinism into lp:launchpad
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Jonathan Lange | ||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||
Merged at revision: | 12461 | ||||||||||||
Proposed branch: | lp:~wgrant/launchpad/secret-query-count-determinism | ||||||||||||
Merge into: | lp:launchpad | ||||||||||||
Diff against target: |
66 lines (+12/-8) 3 files modified
lib/canonical/testing/layers.py (+4/-0) lib/devscripts/ec2test/remote.py (+7/-7) lib/lp/bugs/scripts/checkwatches/remotebugupdater.py (+1/-1) |
||||||||||||
To merge this branch: | bzr merge lp:~wgrant/launchpad/secret-query-count-determinism | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email: mp+51086@code.launchpad.net |
Commit message
[r=jml][bug=724039,724232][no-qa] Prepopulate the cookie secret cache, preventing tests from seeing an extra query when they are the first in a layer.
Description of the change
This branch fixes a spurious failure that I sort of introduced in r12418.
LaunchpadCookie
r12418 caused transaction lifecycle events to be logged, adding an extra 'query' to most browser requests. This pushed some tests over their limit, but only when run as the first test in a layer. This branch causes the secret cache to be populated at layer setup time, removing the state leak and making query counts static again.
To see the difference, try these two test runs:
bin/test -cvvvt test_binary_
bin/test -cvvvt test_source_
The first invocation should always succeed, while the latter will fail without this branch.
I also fixed an unrelated import that was causing the import fascist to whinge.
Personally, I'd prefer you didn't assign to 'unused', since that makes pyflakes upset. But that's a personal thing.
I also wish there were a better solution.
Either way, good to land.