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: os.system('rm %s/*.pyc' % self.promise_dir)
# force to reload the module without rerun python time.sleep(2)
os.system('rm %s/*.pyc' % self.promise_dir) self.generatePromiseScript('my_promise.py', success=True)
del sys.modules["my_promise"] promise_runner2 = MonitorPromiseLauncher(parser)
time.sleep(1.5) promise_runner2.start()
self.generatePromiseScript('my_promise.py', success=True, periodicity=0.017)
promise_runner = MonitorPromiseLauncher(parser)
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