> Don't we always need to define test_suite? Assuming we don't, approved.
The Zope test runner seems to DTRT now (and many other test runners do too).
> I don't really understand why store.execute('SELECT 1') solves these issues,
> though. Is it simply because it's unknown SQL, so Storm conservatively
> flushes?
The difference is that it now does a "SELECT 1" in every store, not just the first (which might be set to auto-commit). At least one of the stores will be set to SERIALIZABLE isolation. As soon as a query is executed in one of these stores a transaction must be started. I suppose I could execute "BEGIN" instead; maybe that would be clearer. In fact, maybe transaction.begin() would be enough! I wonder if I tried that when I wrote these tests the first time...
Thank you for the review :)
> Don't we always need to define test_suite? Assuming we don't, approved.
The Zope test runner seems to DTRT now (and many other test runners do too).
> I don't really understand why store.execute( 'SELECT 1') solves these issues,
> though. Is it simply because it's unknown SQL, so Storm conservatively
> flushes?
The difference is that it now does a "SELECT 1" in every store, not just the first (which might be set to auto-commit). At least one of the stores will be set to SERIALIZABLE isolation. As soon as a query is executed in one of these stores a transaction must be started. I suppose I could execute "BEGIN" instead; maybe that would be clearer. In fact, maybe transaction.begin() would be enough! I wonder if I tried that when I wrote these tests the first time...