[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/ConnectionTests.py Added back the os.waitpid calls since we don't use subprocess on

Jim Fulton jim at zope.com
Thu Nov 20 13:57:09 EST 2008


Log message for revision 93190:
  Added back the os.waitpid calls since we don't use subprocess on
  windows. Just made the waitpid ignore exceptions. :)
  

Changed:
  U   ZODB/trunk/src/ZEO/tests/ConnectionTests.py

-=-
Modified: ZODB/trunk/src/ZEO/tests/ConnectionTests.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/ConnectionTests.py	2008-11-20 18:57:04 UTC (rev 93189)
+++ ZODB/trunk/src/ZEO/tests/ConnectionTests.py	2008-11-20 18:57:08 UTC (rev 93190)
@@ -104,6 +104,7 @@
         logging.info("setUp() %s", self.id())
         self.file = 'storage_conf'
         self.addr = []
+        self._pids = []
         self._servers = []
         self.conf_paths = []
         self.caches = []
@@ -132,6 +133,12 @@
         for adminaddr in self._servers:
             if adminaddr is not None:
                 forker.shutdown_zeo_server(adminaddr)
+        for pid in self._pids:
+            try:
+                os.waitpid(pid, 0)
+            except OSError:
+                pass # The subprocess module may already have waited
+                    
         for c in self.caches:
             for i in 0, 1:
                 for ext in "", ".trace", ".lock":
@@ -214,6 +221,7 @@
         zeoport, adminaddr, pid, path = forker.start_zeo_server(
             sconf, zconf, addr[1], keep)
         self.conf_paths.append(path)
+        self._pids.append(pid)
         self._servers.append(adminaddr)
 
     def shutdownServer(self, index=0):



More information about the Zodb-checkins mailing list