summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitrios Markou <mardim@intracom-telecom.com>2018-07-04 11:49:54 +0300
committerDimitrios Markou <mardim@intracom-telecom.com>2018-07-05 16:33:37 +0300
commit30fc9f545d526fdbd69af483b0bad0ea781d648c (patch)
treeda1003ca1753fde77c948f50f0c062bb8e0acd00
parent6baba08bb155baac3563f839d57e7db3664db892 (diff)
[Bug fix] Execute teardown if SLA is set to "assert"
In Duration runner if SLA is set to "assert" and a SLAValidationError happens then a teardown is needed to avoid garbages in the environment. JIRA: YARDSTICK-1291 Change-Id: I9056b0da3e7e496171ed42430ffc340b5c68f108 Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
-rw-r--r--yardstick/benchmark/runners/duration.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/yardstick/benchmark/runners/duration.py b/yardstick/benchmark/runners/duration.py
index 60f1fa536..14fd8bb47 100644
--- a/yardstick/benchmark/runners/duration.py
+++ b/yardstick/benchmark/runners/duration.py
@@ -74,6 +74,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
except y_exc.SLAValidationError as error:
# SLA validation failed in scenario, determine what to do now
if sla_action == "assert":
+ benchmark.teardown()
raise
elif sla_action == "monitor":
LOG.warning("SLA validation failed: %s", error.args)