def _worker_process(queue, cls, method_name, scenario_cfg,
- context_cfg, aborted):
+ context_cfg, aborted, output_queue):
sequence = 1
errors = ""
try:
- method(data)
+ result = method(data)
except AssertionError as assertion:
# SLA validation failed in scenario, determine what to do now
if sla_action == "assert":
except Exception as e:
errors = traceback.format_exc()
LOG.exception(e)
+ else:
+ if result:
+ output_queue.put(result)
time.sleep(interval)
sequence += 1
- if (errors and sla_action is None):
+ if errors and sla_action is None:
break
benchmark.teardown()
self.process = multiprocessing.Process(
target=_worker_process,
args=(self.result_queue, cls, method, scenario_cfg,
- context_cfg, self.aborted))
+ context_cfg, self.aborted, self.output_queue))
self.process.start()