lp.bugs.browser.tests.test_bugtask.TestBugTaskView.test_rendered_query_counts_constant_with_team_memberships fails when run by itself

Bug #1003097 reported by Gary Poster
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Francesco Banconi

Bug Description

This test fails when you run it by itself.

Traceback (most recent call last):
  File "/home/gary/launchpad/lp/sandbox/lib/lp/bugs/browser/tests/test_bugtask.py", line 143, in test_rendered_query_counts_constant_with_team_memberships
    self.assertThat(recorder, HasQueryCount(LessThan(88)))
MismatchError: queries do not match: 88 is not > 88

Or in more detail, http://pastebin.ubuntu.com/1001606/ .

You can also trigger the failure with some, but not all, tests in the layer running before it. This combination triggers the failure, for instance.

lp.services.webapp.tests.test_batching.TestStormRangeFactory.test_parseMemo__json_no_sequence
lp.bugs.browser.tests.test_bugtask.TestBugTaskView.test_rendered_query_counts_constant_with_team_memberships

It feels like the test is relying on a hot cache of some sort, and when the cache is cold the test fails. I'm not sure what the cache would be, unless the db is not reset after previous tests.

Related branches

Gary Poster (gary)
summary: lp.bugs.browser.tests.test_bugtask.TestBugTaskView.test_rendered_query_counts_constant_with_team_memberships
- fails rarely/intermittently
+ fails when run by itself
description: updated
Changed in launchpad:
assignee: nobody → Francesco Banconi (frankban)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

Fixed in stable r15301 (http://bazaar.launchpad.net/~launchpad-pqm/launchpad/stable/revision/15301) by a commit, but not testable.

tags: added: qa-untestable
Changed in launchpad:
status: In Progress → Fix Committed
Steve Kowalik (stevenk)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.