[Neo-report] r2820 jm - in /trunk: TODO neo/client/Storage.py neo/tests/zodb/testZODB.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Sep 3 21:49:31 CEST 2011


Author: jm
Date: Sat Sep  3 21:49:31 2011
New Revision: 2820

Log:
client: comment about 2 recently failing tests

Modified:
    trunk/TODO
    trunk/neo/client/Storage.py
    trunk/neo/tests/zodb/testZODB.py

Modified: trunk/TODO
==============================================================================
--- trunk/TODO [iso-8859-1] (original)
+++ trunk/TODO [iso-8859-1] Sat Sep  3 21:49:31 2011
@@ -198,6 +198,8 @@ RC  - Review output of pylint (CODE)
       imports.
     - tpc_finish failures (FUNCTIONALITY)
       New failure cases during tpc_finish must be handled.
+    - Fix and reenable deadlock avoidance (SPEED). This is required for
+      neo.tests.zodb.testBasic.BasicTests.check_checkCurrentSerialInTransaction
 
     Admin
     - Make admin node able to monitor multiple clusters simultaneously

Modified: trunk/neo/client/Storage.py
==============================================================================
--- trunk/neo/client/Storage.py [iso-8859-1] (original)
+++ trunk/neo/client/Storage.py [iso-8859-1] Sat Sep  3 21:49:31 2011
@@ -128,6 +128,9 @@ class Storage(BaseStorage.BaseStorage,
     def tpc_finish(self, transaction, f=None):
         tid = self.app.tpc_finish(transaction=transaction,
             tryToResolveConflict=self.tryToResolveConflict, f=f)
+        # XXX: Note that when undoing changes, the following is useless because
+        #      a temporary Storage object is used to commit.
+        #      See also testZODB.NEOZODBTests.checkMultipleUndoInOneTransaction
         if self._snapshot_tid:
             self._snapshot_tid = add64(tid, 1)
         return tid

Modified: trunk/neo/tests/zodb/testZODB.py
==============================================================================
--- trunk/neo/tests/zodb/testZODB.py [iso-8859-1] (original)
+++ trunk/neo/tests/zodb/testZODB.py [iso-8859-1] Sat Sep  3 21:49:31 2011
@@ -31,6 +31,19 @@ class NEOZODBTests(ZODBTestCase, testZOD
         self._db.close()
         super(NEOZODBTests, self).tearDown()
 
+    def checkMultipleUndoInOneTransaction(self):
+        # XXX: Upstream test accesses a persistent object outside a transaction
+        #      (it should call transaction.begin() after the last commit)
+        #      so disable our Connection.afterCompletion optimization.
+        #      This should really be discussed on zodb-dev ML.
+        from ZODB.Connection import Connection
+        afterCompletion = Connection.__dict__['afterCompletion']
+        try:
+            Connection.afterCompletion = Connection.__dict__['newTransaction']
+            super(NEOZODBTests, self).checkMultipleUndoInOneTransaction()
+        finally:
+            Connection.afterCompletion = afterCompletion
+
 if __name__ == "__main__":
     suite = unittest.makeSuite(NEOZODBTests, 'check')
     unittest.main(defaultTest='suite')




More information about the Neo-report mailing list