To avoid breaking tests when monitor is set 05/4805/4
authorPer Holmgren <per.q.holmgren@ericsson.com>
Thu, 17 Dec 2015 15:15:50 +0000 (16:15 +0100)
committerJörgen Karlsson <jorgen.w.karlsson@ericsson.com>
Mon, 21 Dec 2015 13:33:30 +0000 (13:33 +0000)
Two runners, Arithemic and Sequence, broke running tests
even if SLA "monitor" was set. Changed these two runners
to work in similar fashion as the other two, i.e. that only
None can break. "assert" still asserts, and "monitor"
just logs but then continues.

Change-Id: Ic441761cad8747e5ecfcd0babe719c1aa23981e7
JIRA: -

yardstick/benchmark/runners/arithmetic.py
yardstick/benchmark/runners/sequence.py

index b1446e0..7e516ea 100755 (executable)
@@ -124,7 +124,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
 
         sequence += 1
 
-        if errors:
+        if (errors and sla_action is None):
             break
 
     benchmark.teardown()
index 47708fc..b5fae37 100644 (file)
@@ -96,7 +96,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
 
         sequence += 1
 
-        if errors or aborted.is_set():
+        if (errors and sla_action is None) or aborted.is_set():
             break
 
     benchmark.teardown()