summaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/rally
diff options
context:
space:
mode:
authorhelenyao <yaohelan@huawei.com>2017-02-03 20:58:01 -0500
committerhelenyao <yaohelan@huawei.com>2017-02-13 04:28:39 -0500
commit07bc03b6cec54d76868535e390783769d682cb97 (patch)
tree3ff9a0767bdb5bc1b975d75117511e5a66854cd1 /functest/opnfv_tests/openstack/rally
parent8eef71278d06f2fd91b99e6be19069ba077c2d29 (diff)
Use Exception instead of return code
Checking Return status code after each step can be wrapped by Exception catching Also, the return code is not as informative as exception Change-Id: Ic15791d1b8ee47e10cbae8bad46a2cb90ac2b46e Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/rally')
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 16a872f..46d6a57 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -526,14 +526,13 @@ class RallyBase(testcase_base.TestcaseBase):
self._run_tests()
self._generate_report()
self._clean_up()
+ res = testcase_base.TestcaseBase.EX_OK
except Exception as e:
logger.error('Error with run: %s' % e)
- return testcase_base.TestcaseBase.EX_RUN_ERROR
- self.stop_time = time.time()
+ res = testcase_base.TestcaseBase.EX_RUN_ERROR
- # If we are here, it means that the test case was successfully executed
- # criteria is managed by the criteria Field
- return testcase_base.TestcaseBase.EX_OK
+ self.stop_time = time.time()
+ return res
class RallySanity(RallyBase):