Unreliable tests related to query counting

Bug #1377335 reported by Gavin Panella
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse

Bug Description

Something today, 2014-10-03, appears to have caused several tests to become unreliable:

maasserver.views.tests.test_nodes.NodeViewsTest.test_node_list_num_queries_is_independent_of_num_nodes
maasserver.views.tests.test_tags.TagViewsTest.test_view_tag_num_queries_is_independent_of_num_nodes
maasserver.api.tests.test_nodes.TestNodesAPI.test_GET_list_nodes_issues_constant_number_of_queries

I noticed the problem when trying to land https://code.launchpad.net/~allenap/maas/increase-do-configure-dhcp-timeout/+merge/237130. That implies that code in that branch is to blame, but it is a staggeringly simple branch and it's hard to see how it would make any difference. Still, the possibility remains.

I will be disabling these tests and marking them with XXX referencing this bug.

Tags: tests

Related branches

Revision history for this message
Graham Binns (gmb) wrote : Re: [Bug 1377335] [NEW] Unreliable tests related to query counting

On Friday, 3 October 2014, Gavin Panella <email address hidden>
wrote:

> Public bug reported:
>
> Something today, 2014-10-03, appears to have caused several tests to
> become unreliable:
>
>
> maasserver.views.tests.test_nodes.NodeViewsTest.test_node_list_num_queries_is_independent_of_num_nodes
>
> maasserver.views.tests.test_tags.TagViewsTest.test_view_tag_num_queries_is_independent_of_num_nodes
>
> maasserver.api.tests.test_nodes.TestNodesAPI.test_GET_list_nodes_issues_constant_number_of_queries
>

I fear this might have been caused by my branch to add alerts when clusters
are disconnected; I saw this failure when I tried to land the branch, but
couldn't reproduce it locally (and it landed on the second attempt anyway).
Of course, it could be that there was already something going weird and I,
like you, am only seeing it thanks to cosmic providence.

The reason I suspect my branch is that it adds an extra query — fetching
all accepted clusters — to each request. Why that doesn't have a consistent
effect I don't know (I was too jetlagged to dig around and then hey! the
problem went away!).

Anyway, just thoughts. Can't test them right now, but maybe someone else
can.

Changed in maas:
milestone: none → 2.2.0rc3
assignee: nobody → Blake Rouse (blake-rouse)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
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.