Commit 4836a4b4 authored by Julien Muchembled's avatar Julien Muchembled

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

This fixes possible suite freeze due to unreleased locks.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2721 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 829f9b4c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment