Comment 1 for bug 1377335

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.