[Zodb-checkins] CVS: ZODB/src/BTrees/tests - testConflict.py:1.19

Jeremy Hylton jeremy at zope.com
Wed Apr 14 16:46:08 EDT 2004


Update of /cvs-repository/ZODB/src/BTrees/tests
In directory cvs.zope.org:/tmp/cvs-serv9434/src/BTrees/tests

Modified Files:
	testConflict.py 
Log Message:
Add automatic synchronization for Connection objects.

This changes the behavior slightly for invalidations.  A Connection
will receive invalidations even if it didn't have any modified objects
in the transaction, e.g. db.undo() or a read-only transaction.  For
this to work, it assumes that the thread that called db.open() is the
thread that is going to use the connection.  If this isn't true, the
synch argument to db.open() can be used to disable the new feature.


=== ZODB/src/BTrees/tests/testConflict.py 1.18 => 1.19 ===
--- ZODB/src/BTrees/tests/testConflict.py:1.18	Mon Dec 29 17:40:44 2003
+++ ZODB/src/BTrees/tests/testConflict.py	Wed Apr 14 16:45:36 2004
@@ -469,7 +469,7 @@
         r1["t"] = self.t
         get_transaction().commit()
 
-        r2 = self.db.open().root()
+        r2 = self.db.open(synch=False).root()
         copy = r2["t"]
         # Make sure all of copy is loaded.
         list(copy.values())
@@ -546,7 +546,7 @@
         r1["t"] = self.t
         get_transaction().commit()
 
-        r2 = self.db.open().root()
+        r2 = self.db.open(synch=False).root()
         copy = r2["t"]
         # Make sure all of copy is loaded.
         list(copy.values())
@@ -687,7 +687,7 @@
         r1["t"] = self.t
         get_transaction().commit()
 
-        r2 = self.db.open().root()
+        r2 = self.db.open(synch=False).root()
         copy = r2["t"]
         # Make sure all of copy is loaded.
         list(copy.values())




More information about the Zodb-checkins mailing list