Commit 6703c2e0 authored by Alain Takoudjou's avatar Alain Takoudjou

monitor: fix test on promise status_changed

parent 14aad48d
...@@ -220,14 +220,11 @@ class RunPromise(GenericPromise): ...@@ -220,14 +220,11 @@ class RunPromise(GenericPromise):
} }
self.assertEquals(expected_result, my_result) self.assertEquals(expected_result, my_result)
if "my_promise" in sys.modules:
# force to reload the module without rerun python
os.system('rm %s/*.pyc' % self.promise_dir) os.system('rm %s/*.pyc' % self.promise_dir)
del sys.modules["my_promise"] time.sleep(2)
time.sleep(1.5) self.generatePromiseScript('my_promise.py', success=True)
self.generatePromiseScript('my_promise.py', success=True, periodicity=0.017) promise_runner2 = MonitorPromiseLauncher(parser)
promise_runner = MonitorPromiseLauncher(parser) promise_runner2.start()
promise_runner.start()
my_result = json.loads(open(result_file).read().decode("utf-8")) my_result = json.loads(open(result_file).read().decode("utf-8"))
my_result['result'].pop('date') my_result['result'].pop('date')
......
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