Merge ~lgp171188/launchpad:fix-bugtask-query-count-test-failures into launchpad:master

Proposed by Guruprasad
Status: Merged
Approved by: Colin Watson
Approved revision: 7940fd83ba291fce2096546bef1eeb48dab48639
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~lgp171188/launchpad:fix-bugtask-query-count-test-failures
Merge into: launchpad:master
Diff against target: 48 lines (+5/-5)
1 file modified
lib/lp/bugs/browser/tests/test_bugtask.py (+5/-5)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+415649@code.launchpad.net

Commit message

Fix the query counts in the bugtask browser tests

The expected number of queries had increased with the changes to add a
UI for the bug lock status. This updates the failing tests with the
correct number of expected queries.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/bugs/browser/tests/test_bugtask.py b/lib/lp/bugs/browser/tests/test_bugtask.py
2index 245ba07..55f3188 100644
3--- a/lib/lp/bugs/browser/tests/test_bugtask.py
4+++ b/lib/lp/bugs/browser/tests/test_bugtask.py
5@@ -132,7 +132,7 @@ class TestBugTaskView(TestCaseWithFactory):
6 0, 10, login_method=lambda: login(ADMIN_EMAIL))
7 # This may seem large: it is; there is easily another 25% fat in
8 # there.
9- self.assertThat(recorder1, HasQueryCount(LessThan(86)))
10+ self.assertThat(recorder1, HasQueryCount(LessThan(89)))
11 self.assertThat(recorder2, HasQueryCount.byEquality(recorder1))
12
13 def test_rendered_query_counts_constant_with_attachments(self):
14@@ -143,7 +143,7 @@ class TestBugTaskView(TestCaseWithFactory):
15 lambda: self.getUserBrowser(url, person),
16 lambda: self.factory.makeBugAttachment(bug=task.bug),
17 1, 9, login_method=lambda: login(ADMIN_EMAIL))
18- self.assertThat(recorder1, HasQueryCount(LessThan(87)))
19+ self.assertThat(recorder1, HasQueryCount(LessThan(90)))
20 self.assertThat(recorder2, HasQueryCount.byEquality(recorder1))
21
22 def makeLinkedBranchMergeProposal(self, sourcepackage, bug, owner):
23@@ -178,7 +178,7 @@ class TestBugTaskView(TestCaseWithFactory):
24 recorder1, recorder2 = record_two_runs(
25 lambda: self.getUserBrowser(url, owner),
26 make_merge_proposals, 0, 1)
27- self.assertThat(recorder1, HasQueryCount(LessThan(94)))
28+ self.assertThat(recorder1, HasQueryCount(LessThan(97)))
29 # Ideally this should be much fewer, but this tries to keep a win of
30 # removing more than half of these.
31 self.assertThat(
32@@ -224,7 +224,7 @@ class TestBugTaskView(TestCaseWithFactory):
33 lambda: self.getUserBrowser(url, person),
34 lambda: add_activity("description", self.factory.makePerson()),
35 1, 20, login_method=lambda: login(ADMIN_EMAIL))
36- self.assertThat(recorder1, HasQueryCount(LessThan(87)))
37+ self.assertThat(recorder1, HasQueryCount(LessThan(90)))
38 self.assertThat(recorder2, HasQueryCount.byEquality(recorder1))
39
40 def test_rendered_query_counts_constant_with_milestones(self):
41@@ -234,7 +234,7 @@ class TestBugTaskView(TestCaseWithFactory):
42
43 with celebrity_logged_in('admin'):
44 browses_under_limit = BrowsesWithQueryLimit(
45- 87, self.factory.makePerson())
46+ 90, self.factory.makePerson())
47
48 self.assertThat(bug, browses_under_limit)
49

Subscribers

People subscribed via source and target branches

to status/vote changes: