[Zope-Checkins] CVS: ZODB3/ZEO/tests - testStart.py:1.12.8.5

Guido van Rossum guido@python.org
Mon, 27 Jan 2003 17:12:42 -0500


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

Modified Files:
      Tag: ZODB3-3_1-branch
	testStart.py 
Log Message:
Tweak the ClientStorage timeout parameters to make this test go a lot
faster (usually).

Also add an XXX comment to a mysterious use of the constant 10.


=== ZODB3/ZEO/tests/testStart.py 1.12.8.4 => 1.12.8.5 ===
--- ZODB3/ZEO/tests/testStart.py:1.12.8.4	Mon Jan 27 14:20:38 2003
+++ ZODB3/ZEO/tests/testStart.py	Mon Jan 27 17:12:39 2003
@@ -90,7 +90,7 @@
             try:
                 _pid, status = os.waitpid(pid, flag)
             except os.error, err:
-                if err[0] == 10:
+                if err[0] == 10: # XXX why not use errno.ECHILD ?
                     continue
                 print err
             else:
@@ -138,7 +138,9 @@
         return buf
 
     def connect(self, port=None, wait=1):
-        cs = ClientStorage(('', port), wait=wait)
+        cs = ClientStorage(('', port), wait=wait,
+                           min_disconnect_poll=0.1,
+                           max_disconnect_poll=0.2)
         cs.close()
 
     def testErrNoPort(self):