Commit 4cf2bb01 authored by Benjamin Blanc's avatar Benjamin Blanc

Change SIGINT to SIGTERM signal to simulate SlapOS answers

parent 8a18779d
...@@ -100,12 +100,13 @@ class ScalabilityTestRunner(): ...@@ -100,12 +100,13 @@ class ScalabilityTestRunner():
self.testnode.log("Dummy SlapOS Master answer received.") self.testnode.log("Dummy SlapOS Master answer received.")
self.last_slapos_answer.append(True) self.last_slapos_answer.append(True)
def _prepareDummySlapOSAnswer(self): def _prepareDummySlapOSAnswer(self):
print "Dummy slapOS answer enabled, press crtl+c to simulate SlapOS (positive) answer." print "Dummy slapOS answer enabled, send signal to %s (=PID) to simu\
signal.signal(signal.SIGINT, self._getSignal) late a SlapOS (positive) answer." %(str(os.getpid()),)
signal.signal(signal.SIGTERM, self._getSignal)
def _comeBackFromDummySlapOS(self): def _comeBackFromDummySlapOS(self):
print "Dummy slapOS answer disabled, don't press crtl+c anymore." print "Dummy slapOS answer disabled"
# use SIG_USR (kill) # use SIG_USR (kill)
signal.signal(signal.SIGINT, signal.SIG_DFL) signal.signal(signal.SIGTERM, signal.SIG_DFL)
def simulateSlapOSAnswer(self): def simulateSlapOSAnswer(self):
if len(self.last_slapos_answer)==0: if len(self.last_slapos_answer)==0:
return False return False
......
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