On Mon, Feb 28, 2011 at 7:33 PM, Jeroen Vermeulen <[email protected]> wrote:
> On 2011-02-28 05:27, Robert Collins wrote:
>
>> Thirdly, there is a new test helper I'm landing at the moment -
>> BrowsesWithQueryLimit. This renders the default view for a page and
>> checks the query count is under your supplied limit.
>
> Thank you, bearer of good news.
>
> This does raise a question that's been worrying me.  It's been about 3 years
> since I last did serious work on testing page query counts, so maybe I've
> just forgotten something something basic.  But…
>
> …do we know that in real life our request isn't naïvely fetching lots of
> individual objects by id, ones that in the test are fresh in the cache?
>  Think cases of "foo.bar.zot" where the objects you reference were just
> created by the test.  References like that are generally where the fast but
> numerous queries come from.

Are we 100% sure? no. We can (probably should) add in a storm store
reset to this. Some tests already do do this, will need to poke around
and see why others are not.

However, we can be completely sure when someone TDDs a test that the
behaviour they saw beforehand has improved. (I do this routinely
because otherwise its impossible to be sure that one is improving
things.

-Rob

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to