Commit 0b962d20 authored by Benjamin Blanc's avatar Benjamin Blanc

Change signal num into the dummy slapOS

parent 46186b06
...@@ -98,13 +98,13 @@ class ScalabilityTestRunner(): ...@@ -98,13 +98,13 @@ class ScalabilityTestRunner():
self.log("Dummy SlapOS Master answer received.") self.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, send signal to %s (=PID) to simu\ print "Dummy slapOS answer enabled, send signal to %s (kill -10 %s) to simu\
late a SlapOS (positive) answer." %(str(os.getpid()),) late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),)
signal.signal(signal.SIGTERM, self._getSignal) signal.signal(signal.SIGUSR1, self._getSignal)
def _comeBackFromDummySlapOS(self): def _comeBackFromDummySlapOS(self):
print "Dummy slapOS answer disabled, please don't send more signals." print "Dummy slapOS answer disabled, please don't send more signals."
# use SIG_USR (kill) # use SIG_USR (kill)
signal.signal(signal.SIGTERM, signal.SIG_DFL) signal.signal(signal.SIGUSR1, 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