remove old master process fix

This commit is contained in:
Thomas S Hatch 2012-03-29 15:41:32 -06:00
parent d643db9154
commit d1dee6d4e3

View File

@ -25,7 +25,6 @@ class TestDaemon(object):
'''
Set up the master and minion daemons, and run related cases
'''
def __enter__(self):
'''
Start a master and minion
@ -82,25 +81,11 @@ class TestDaemon(object):
Kill the minion and master processes
'''
self.minion_process.terminate()
self.stop_master_processes()
self.master_process.terminate()
self.syndic_process.terminate()
self.smaster_process.terminate()
def stop_master_processes(self):
try:
with open(self.master_opts['pidfile']) as pidfile:
for pid in pidfile.readlines():
if len(pid.strip()):
try:
os.kill(int(pid.strip()), signal.SIGTERM)
except OSError:
pass
except IOError:
pass
class ModuleCase(TestCase):
'''
Execute a module function