summaryrefslogtreecommitdiffstats
path: root/vnftest/onap/runners/iteration.py
diff options
context:
space:
mode:
authorMoshe <moshehoa@amdocs.com>2018-03-06 18:50:02 +0200
committerMoshe <moshehoa@amdocs.com>2018-03-06 18:51:42 +0200
commit976c2a916ea810effc34c5838b80b83bc9f8e6e0 (patch)
tree432fb4af11e213f759d3156414e9958f4dc12ff3 /vnftest/onap/runners/iteration.py
parent0bb532c41e89568966ca2bfae259737e8830249b (diff)
handle results format
Issue-ID: VNFSDK-195 Change-Id: I31f07515b252247fe777791d883d37ba9ba1bd6a Signed-off-by: Moshe <moshehoa@amdocs.com>
Diffstat (limited to 'vnftest/onap/runners/iteration.py')
-rw-r--r--vnftest/onap/runners/iteration.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/vnftest/onap/runners/iteration.py b/vnftest/onap/runners/iteration.py
index 9bac92e..c0bd74f 100644
--- a/vnftest/onap/runners/iteration.py
+++ b/vnftest/onap/runners/iteration.py
@@ -67,17 +67,21 @@ def _worker_process(queue, cls, method_name, step_cfg,
"sequence": sequence})
data = {}
- errors = ""
+ errors = []
try:
result = method(data)
+ if result:
+ # add timeout for put so we don't block test
+ # if we do timeout we don't care about dropping individual KPIs
+ output_queue.put(result, True, QUEUE_PUT_TIMEOUT)
except AssertionError as assertion:
# SLA validation failed in step, determine what to do now
if sla_action == "assert":
raise
elif sla_action == "monitor":
LOG.warning("SLA validation failed: %s", assertion.args)
- errors = assertion.args
+ errors.append(assertion.args)
elif sla_action == "rate-control":
try:
step_cfg['options']['rate']
@@ -89,13 +93,8 @@ def _worker_process(queue, cls, method_name, step_cfg,
sequence = 1
continue
except Exception:
- errors = traceback.format_exc()
+ errors.append(traceback.format_exc())
LOG.exception("")
- else:
- if result:
- # add timeout for put so we don't block test
- # if we do timeout we don't care about dropping individual KPIs
- output_queue.put(result, True, QUEUE_PUT_TIMEOUT)
time.sleep(interval)