[Neo-report] r2721 jm - /trunk/neo/tests/functional/__init__.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Apr 20 17:20:13 CEST 2011


Author: jm
Date: Wed Apr 20 17:20:13 2011
New Revision: 2721

Log:
tests: make sure NEOCluster.stop kills all children, even if one failed

This fixes possible suite freeze due to unreleased locks.

Modified:
    trunk/neo/tests/functional/__init__.py

Modified: trunk/neo/tests/functional/__init__.py
==============================================================================
--- trunk/neo/tests/functional/__init__.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/__init__.py [iso-8859-1] Wed Apr 20 17:20:13 2011
@@ -372,6 +372,7 @@ class NEOCluster(object):
             neoctl.enableStorageList([x[2] for x in storage_node_list])
 
     def stop(self, clients=True):
+        error_list = []
         for process_list in self.process_dict.itervalues():
             for process in process_list:
                 try:
@@ -379,11 +380,15 @@ class NEOCluster(object):
                     process.wait()
                 except AlreadyStopped:
                     pass
+                except NodeProcessError, e:
+                    error_list += e.args
         if clients:
             for zodb_storage in self.zodb_storage_list:
                 zodb_storage.close()
             self.zodb_storage_list = []
         time.sleep(0.5)
+        if error_list:
+            raise NodeProcessError('\n'.join(error_list))
 
     def getNEOCTL(self):
         return self.neoctl




More information about the Neo-report mailing list