[Zodb-checkins] CVS: ZODB3/ZODB/tests - testZODB.py:1.22

Jeremy Hylton jeremy at zope.com
Mon Jan 5 22:45:24 EST 2004


Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv7375/ZODB/tests

Modified Files:
	testZODB.py 
Log Message:
Make sure _setstate_noncurrent() returns True on success.

Bug reported by Dieter Maurer.

The change required several of the read-conflict tests to be updated
to specify that they don't want MVCC support.  It was basically
accidental that they passed before this change.  Note that we don't
have any tests of code that gets a read conflict in MVCC mode, which
would only be possible after a pack() or in some other weird case.


=== ZODB3/ZODB/tests/testZODB.py 1.21 => 1.22 ===
--- ZODB3/ZODB/tests/testZODB.py:1.21	Mon Dec 29 17:40:49 2003
+++ ZODB3/ZODB/tests/testZODB.py	Mon Jan  5 22:44:53 2004
@@ -212,7 +212,7 @@
         # error because the object state read is not necessarily
         # consistent with the objects read earlier in the transaction.
 
-        conn = self._db.open()
+        conn = self._db.open(mvcc=False)
         conn.setLocalTransaction()
         r1 = conn.root()
         r1["p"] = self.obj
@@ -220,7 +220,7 @@
         conn.getTransaction().commit()
 
         # start a new transaction with a new connection
-        cn2 = self._db.open()
+        cn2 = self._db.open(mvcc=False)
         # start a new transaction with the other connection
         cn2.setLocalTransaction()
         r2 = cn2.root()
@@ -245,7 +245,7 @@
     def checkReadConflictIgnored(self):
         # Test that an application that catches a read conflict and
         # continues can not commit the transaction later.
-        root = self._db.open().root()
+        root = self._db.open(mvcc=False).root()
         root["real_data"] = real_data = PersistentMapping()
         root["index"] = index = PersistentMapping()
 
@@ -256,7 +256,7 @@
         get_transaction().commit()
 
         # load some objects from one connection
-        cn2 = self._db.open()
+        cn2 = self._db.open(mvcc=False)
         cn2.setLocalTransaction()
         r2 = cn2.root()
         real_data2 = r2["real_data"]




More information about the Zodb-checkins mailing list