[Zodb-checkins] CVS: ZODB4/ZEO/tests - ConnectionTests.py:1.5

Barry Warsaw barry@wooz.org
Fri, 20 Dec 2002 00:04:25 -0500


Update of /cvs-repository/ZODB4/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv29062

Modified Files:
	ConnectionTests.py 
Log Message:
Make sure defunct processes are actually wait'd on.  Back port to
zodb3.


=== ZODB4/ZEO/tests/ConnectionTests.py 1.4 => 1.5 ===
--- ZODB4/ZEO/tests/ConnectionTests.py:1.4	Thu Dec 19 16:21:56 2002
+++ ZODB4/ZEO/tests/ConnectionTests.py	Fri Dec 20 00:04:24 2002
@@ -79,6 +79,10 @@
         for adminaddr in self._servers:
             if adminaddr is not None:
                 forker.shutdown_zeo_server(adminaddr)
+        if hasattr(os, 'waitpid'):
+            # Not in Windows Python until 2.3
+            for pid in self._pids:
+                os.waitpid(pid, 0)
         for i in 0, 1:
             path = "c1-test-%d.zec" % i
             if os.path.exists(path):
@@ -201,8 +205,6 @@
         # We don't want the read-write server created by setUp()
         self.shutdownServer()
         self._servers = []
-        self._pids = []
-
         # Start a read-only server
         self.startServer(create=False, index=0, ro_svr=True)
         # Start a read-only client
@@ -224,8 +226,6 @@
         # We don't want the read-write server created by setUp()
         self.shutdownServer()
         self._servers = []
-        self._pids = []
-
         # Start a read-only server
         self.startServer(create=False, index=0, ro_svr=True)
         # Start a read-only-fallback client
@@ -248,7 +248,6 @@
         # Shut down the server
         self.shutdownServer()
         self._servers = []
-        self._pids = []
         # Poll until the client disconnects
         self.pollDown()
         # Stores should fail now
@@ -429,8 +428,6 @@
         # We don't want the read-write server created by setUp()
         self.shutdownServer()
         self._servers = []
-        self._pids = []
-
         # Start a read-only server
         self.startServer(create=False, index=0, read_only=True)
         # Start a read-only client
@@ -444,8 +441,6 @@
         # We don't want the read-write server created by setUp()
         self.shutdownServer()
         self._servers = []
-        self._pids = []
-
         # Start a read-only server
         self.startServer(create=False, index=0, read_only=True)
         # Start a read-only-fallback client
@@ -465,7 +460,6 @@
         # Shut down the server
         self.shutdownServer()
         self._servers = []
-        self._pids = []
         # Poll until the client disconnects
         self.pollDown()
         # Stores should still fail
@@ -490,7 +484,6 @@
         # Shut down the server
         self.shutdownServer()
         self._servers = []
-        self._pids = []
         # Poll until the client disconnects
         self.pollDown()
         # Stores should fail now
@@ -510,8 +503,6 @@
         # We don't want the read-write server created by setUp()
         self.shutdownServer()
         self._servers = []
-        self._pids = []
-
         # Start a read-only server
         self.startServer(create=False, read_only=True)
         # Start a client in fallback mode
@@ -522,7 +513,6 @@
         # Shut down the server
         self.shutdownServer()
         self._servers = []
-        self._pids = []
         # Poll until the client disconnects
         self.pollDown()
         # Stores should fail now
@@ -542,11 +532,8 @@
         # We don't want the read-write server created by setUp()
         self.shutdownServer()
         self._servers = []
-        self._pids = []
-
         # Allocate a second address (for the second server)
         self._newAddr()
-
         # Start a read-only server
         self.startServer(create=False, index=0, read_only=True)
         # Start a client in fallback mode