Mercurial > p > roundup > code
diff test/test_mysql.py @ 4448:2784c239e6c8
clear the cache on commit for rdbms backends:
Don't carry over cached values from one transaction to the next (there
may be other changes from other transactions) see new ConcurrentDBTest
for a read-modify-update cycle that fails with the old caching
behavior.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Fri, 22 Oct 2010 14:14:26 +0000 |
| parents | 2eae5848912d |
| children | 34dce76bb202 |
line wrap: on
line diff
--- a/test/test_mysql.py Thu Oct 21 20:31:13 2010 +0000 +++ b/test/test_mysql.py Fri Oct 22 14:14:26 2010 +0000 @@ -23,6 +23,7 @@ from roundup.backends import get_backend, have_backend from db_test_base import DBTest, ROTest, config, SchemaTest, ClassicInitTest +from db_test_base import ConcurrentDBTest class mysqlOpener: @@ -63,6 +64,15 @@ ClassicInitTest.tearDown(self) self.nuke_database() +class mysqlConcurrencyTest(mysqlOpener, ConcurrentDBTest): + backend = 'mysql' + def setUp(self): + mysqlOpener.setUp(self) + ClassicInitTest.setUp(self) + def tearDown(self): + ClassicInitTest.tearDown(self) + self.nuke_database() + from session_common import RDBMSTest class mysqlSessionTest(mysqlOpener, RDBMSTest): def setUp(self): @@ -92,6 +102,7 @@ suite.addTest(unittest.makeSuite(mysqlSchemaTest)) suite.addTest(unittest.makeSuite(mysqlClassicInitTest)) suite.addTest(unittest.makeSuite(mysqlSessionTest)) + suite.addTest(unittest.makeSuite(mysqlConcurrencyTest)) return suite if __name__ == '__main__':
