← Back to team overview

yellow team mailing list archive

[Merge] lp:~frankban/launchpad/bug-1038253-intermittent-failure into lp:launchpad

 

Francesco Banconi has proposed merging lp:~frankban/launchpad/bug-1038253-intermittent-failure into lp:launchpad.

Requested reviews:
  Yellow Squad (yellow)
Related bugs:
  Bug #1038253 in Launchpad itself: "lp.bugs.browser.tests.test_bugtask.TestBugTaskView.test_rendered_query_counts_constant_with_team_memberships fails intermittently in parallel tests"
  https://bugs.launchpad.net/launchpad/+bug/1038253

For more details, see:
https://code.launchpad.net/~frankban/launchpad/bug-1038253-intermittent-failure/+merge/121143

= Summary =

test_rendered_query_counts_constant_with_team_memberships (in lp.bugs.browser.tests.test_bugtask.TestBugTaskView) failed during a parallel test run.

This is an isolation error:
- when run in isolation, the test performs 94 queries (and fails)
- when run as part of the TestCase, the test performs 93 queries
- the comment in the test said that in isolation the query count is 89
- the test asserted the query count is less than 94

== Implementation ==

Now the comment in test mentions the correct number of queries, and the assertion is fixed (less than 95).
The goal of the test, AFAICT, is to ensure the query count does not change adding teams to the person. Increasing the number of queries in the assertion is a fast fix that does not invalidate this goal.

NO Qa.

== Lint ==

Linting changed files:
  lib/lp/bugs/browser/tests/test_bugtask.py

-- 
https://code.launchpad.net/~frankban/launchpad/bug-1038253-intermittent-failure/+merge/121143
Your team Yellow Squad is requested to review the proposed merge of lp:~frankban/launchpad/bug-1038253-intermittent-failure into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/tests/test_bugtask.py'
--- lib/lp/bugs/browser/tests/test_bugtask.py	2012-08-21 20:41:05 +0000
+++ lib/lp/bugs/browser/tests/test_bugtask.py	2012-08-24 09:38:28 +0000
@@ -140,12 +140,12 @@
         self.getUserBrowser(url, person_no_teams)
         # This may seem large: it is; there is easily another 30% fat in
         # there.
-        # If this test is run in isolation, the query count is 89.
+        # If this test is run in isolation, the query count is 94.
         # Other tests in this TestCase could cache the
         # "SELECT id, product, project, distribution FROM PillarName ..."
         # query by previously browsing the task url, in which case the
         # query count is decreased by one.
-        self.assertThat(recorder, HasQueryCount(LessThan(94)))
+        self.assertThat(recorder, HasQueryCount(LessThan(95)))
         count_with_no_teams = recorder.count
         # count with many teams
         self.invalidate_caches(task)