[Zodb-checkins] CVS: ZODB3/ZEO/tests - CommitLockTests.py:1.10

Jeremy Hylton jeremy@zope.com
Mon, 18 Nov 2002 18:17:42 -0500


Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv21897/ZEO/tests

Modified Files:
	CommitLockTests.py 
Log Message:
Merge ZODB 3.1 changes to the trunk.
XXX Not sure if berkeley still works.


=== ZODB3/ZEO/tests/CommitLockTests.py 1.9 => 1.10 ===
--- ZODB3/ZEO/tests/CommitLockTests.py:1.9	Tue Sep 10 17:22:11 2002
+++ ZODB3/ZEO/tests/CommitLockTests.py	Mon Nov 18 18:17:40 2002
@@ -124,9 +124,12 @@
         # started, but before it finishes.  The dowork() function
         # executes after the first transaction has completed.
 
-        # Start on transaction normally.
+        # Start on transaction normally and get the lock.
         t = Transaction()
         self._storage.tpc_begin(t)
+        oid = self._storage.new_oid()
+        self._storage.store(oid, ZERO, zodb_pickle(MinPO(1)), '', t)
+        self._storage.tpc_vote(t)
 
         # Start a second transaction on a different connection without
         # blocking the test thread.
@@ -141,9 +144,6 @@
             else:
                 self._storages.append((storage2, t2))
 
-        oid = self._storage.new_oid()
-        self._storage.store(oid, ZERO, zodb_pickle(MinPO(1)), '', t)
-        self._storage.tpc_vote(t)
         if method_name == "tpc_finish":
             self._storage.tpc_finish(t)
             self._storage.load(oid, '')