On Sat, Feb 19, 2011 at 9:12 PM, Jonathan Lange <[email protected]> wrote:

> 2. I don't really understand why canonical.ftests.pgsql (soon to be
> lp.testing.pgsql) is needed. Could someone explain? There are some
> mysterious comments about "until we've switched to storm"
> (test_mockdb) – have we? If so, what opportunities do we have for
> clean up? Also, I saw some tests using it directly, surely there's
> something they should be using instead?
>
> (I hope to delete canonical.testing.pgsql)

When running tests, we wrap the connection object so we can sniff
certain operations. In particular, if we don't see a commit happen we
assume we can just issue a rollback() to reset the database, saving
lots of time.

The mockdb is an ongoing project I hope to revisit soon, which should
be simpler now we have switched to Storm (as indicated by the
comments). Tests will replay from a recording instead of querying the
real db for hopefully massive speed improvements.

This is also where the testsuite's database test fixture lives, which
is strangely enough rather necessary :)



> 3. canonical.lp is "deprecated", but it doesn't say what it's
> deprecated in favour of. Lots of code uses initZopeless from that
> module, so I'd guess that it's in favour of
> c.database.sqlbase.ZopelessTransactionManager. Bug 484033 doesn't
> really add much more information.

I think the module is deprecated in favor of putting things in a
better location...

-- 
Stuart Bishop <[email protected]>
http://www.stuartbishop.net/

_______________________________________________
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