[Zodb-checkins] CVS: ZODB3/ZEO/tests - ConnectionTests.py:1.7

Guido van Rossum guido@python.org
Thu, 31 Oct 2002 10:19:25 -0500


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

Modified Files:
	ConnectionTests.py 
Log Message:
Change checkMultiStorageTransaction to make it easier to crank up all
config parameters at once.

Add (commented-out) print statements showing progress.


=== ZODB3/ZEO/tests/ConnectionTests.py 1.6 => 1.7 ===
--- ZODB3/ZEO/tests/ConnectionTests.py:1.6	Wed Oct 30 16:44:25 2002
+++ ZODB3/ZEO/tests/ConnectionTests.py	Thu Oct 31 10:19:24 2002
@@ -524,10 +524,12 @@
 
     def checkMultiStorageTransaction(self):
         # Configuration parameters (larger values mean more likely deadlocks)
-        self.nservers = 2
-        self.nthreads = 2
-        self.ntrans = 2
-        self.nobj = 2
+        N = 2
+        # These don't *have* to be all the same, but it's convenient this way
+        self.nservers = N
+        self.nthreads = N
+        self.ntrans = N
+        self.nobj = N
 
         # Start extra servers
         for i in range(1, self.nservers):
@@ -582,6 +584,7 @@
             # Begin a transaction
             t = Transaction()
             for c in clients:
+                #print "%s.%s.%s begin\n" % (tname, c.__name, i),
                 c.tpc_begin(t)
 
             for j in range(testcase.nobj):
@@ -590,17 +593,20 @@
                     oid = c.new_oid()
                     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)
                     c.__serials.update(handle_all_serials(oid, s))
 
             # Vote on all servers and handle serials
             for c in clients:
+                #print "%s.%s.%s vote\n" % (tname, c.__name, i),
                 s = c.tpc_vote(t)
                 c.__serials.update(handle_all_serials(None, s))
 
             # Finish on all servers
             for c in clients:
+                #print "%s.%s.%s finish\n" % (tname, c.__name, i),
                 c.tpc_finish(t)
 
             for c in clients: