[Zope3-checkins] CVS: ZODB4/src/zodb/zeo/tests - commitlock.py:1.3.4.2 connection.py:1.5.4.2 test_tbuf.py:1.2.12.1 threadtests.py:1.4.4.2

Barry Warsaw barry@wooz.org
Thu, 13 Mar 2003 14:39:45 -0500


Update of /cvs-repository/ZODB4/src/zodb/zeo/tests
In directory cvs.zope.org:/tmp/cvs-serv9877/zeo/tests

Modified Files:
      Tag: opaque-pickles-branch
	commitlock.py connection.py test_tbuf.py threadtests.py 
Log Message:
> Next step: get rid of the tuple in the argument list.

Completed.

Also, reorder the arguments to restore() so that data and refs are
buddies again, just like in the store() call.

I believe we're ready to merge back to the head.


=== ZODB4/src/zodb/zeo/tests/commitlock.py 1.3.4.1 => 1.3.4.2 ===
--- ZODB4/src/zodb/zeo/tests/commitlock.py:1.3.4.1	Wed Mar 12 16:41:21 2003
+++ ZODB4/src/zodb/zeo/tests/commitlock.py	Thu Mar 13 14:39:44 2003
@@ -43,11 +43,11 @@
         try:
             self.storage.tpcBegin(self.trans)
             oid = self.storage.newObjectId()
-            p = zodb_pickle(MinPO("c"))
-            self.storage.store(oid, ZERO, p, '', self.trans)
+            data, refs = zodb_pickle(MinPO("c"))
+            self.storage.store(oid, ZERO, data, refs, '', self.trans)
             oid = self.storage.newObjectId()
-            p = zodb_pickle(MinPO("c"))
-            self.storage.store(oid, ZERO, p, '', self.trans)
+            data, refs = zodb_pickle(MinPO("c"))
+            self.storage.store(oid, ZERO, data, refs, '', self.trans)
             self.myvote()
             if self.method == "tpcFinish":
                 self.storage.tpcFinish(self.trans)
@@ -98,7 +98,8 @@
         txn = Transaction()
         self._storage.tpcBegin(txn)
         oid = self._storage.newObjectId()
-        self._storage.store(oid, ZERO, zodb_pickle(MinPO(1)), '', txn)
+        data, refs = zodb_pickle(MinPO(1))
+        self._storage.store(oid, ZERO, data, refs, '', txn)
         return oid, txn
 
     def checkCommitLockVoteFinish(self):


=== ZODB4/src/zodb/zeo/tests/connection.py 1.5.4.1 => 1.5.4.2 ===
--- ZODB4/src/zodb/zeo/tests/connection.py:1.5.4.1	Wed Mar 12 16:41:21 2003
+++ ZODB4/src/zodb/zeo/tests/connection.py	Thu Mar 13 14:39:44 2003
@@ -284,8 +284,8 @@
         txn = Transaction()
         self._storage.tpcBegin(txn)
         for oid in oids:
-            data = zodb_pickle(MinPO(oid))
-            self._storage.store(oid, None, data, '', txn)
+            data, refs = zodb_pickle(MinPO(oid))
+            self._storage.store(oid, None, data, refs, '', txn)
         self.shutdownServer()
         self.assertRaises(ClientDisconnected, self._storage.tpcVote, txn)
         self._storage.tpcAbort(txn)
@@ -751,8 +751,8 @@
                     c.__oids.append(oid)
                     data = MinPO("%s.%s.t%d.o%d" % (tname, c.__name, i, j))
                     #print data.value
-                    data = zodb_pickle(data)
-                    s = c.store(oid, ZERO, data, '', t)
+                    data, refs = zodb_pickle(data)
+                    s = c.store(oid, ZERO, data, refs, '', t)
                     c.__serials.update(handle_all_serials(oid, s))
 
             # Vote on all servers and handle serials


=== ZODB4/src/zodb/zeo/tests/test_tbuf.py 1.2 => 1.2.12.1 ===
--- ZODB4/src/zodb/zeo/tests/test_tbuf.py:1.2	Wed Dec 25 09:12:22 2002
+++ ZODB4/src/zodb/zeo/tests/test_tbuf.py	Thu Mar 13 14:39:44 2003
@@ -23,7 +23,7 @@
 
 def new_store_data():
     """Return arbitrary data to use as argument to store() method."""
-    return random_string(8), '', random_string(random.randrange(1000))
+    return random_string(8), '', random_string(random.randrange(1000)), []
 
 def new_invalidate_data():
     """Return arbitrary data to use as argument to invalidate() method."""


=== ZODB4/src/zodb/zeo/tests/threadtests.py 1.4.4.1 => 1.4.4.2 ===
--- ZODB4/src/zodb/zeo/tests/threadtests.py:1.4.4.1	Wed Mar 12 16:41:21 2003
+++ ZODB4/src/zodb/zeo/tests/threadtests.py	Thu Mar 13 14:39:44 2003
@@ -50,7 +50,8 @@
     def run(self):
         self.storage.tpcBegin(self.trans)
         oid = self.storage.newObjectId()
-        self.storage.store(oid, ZERO, zodb_pickle(MinPO("c")), '', self.trans)
+        data, refs = zodb_pickle(MinPO("c"))
+        self.storage.store(oid, ZERO, data, refs, '', self.trans)
         self.storage.tpcVote(self.trans)
         self.threadStartedEvent.set()
         self.doNextEvent.wait(10)