aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2019-08-27 19:02:58 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-08-27 19:02:58 +0000
commit3b59b8cea7d8ff1ab4543ce5db35a67881e107b1 (patch)
tree0f8e189f8808e9a14896ea3931b04d2f2a65e04c
parent69febafcc9eec68889990c271993817b4214a968 (diff)
parent10ce40881184217bd72ec3e6cae474fe77a2e6c9 (diff)
Merge "Protect vs rally infine loop" into stable/iruya
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 22b508afa..f6e563ba7 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -67,6 +67,7 @@ class RallyBase(singlevm.VmReady2):
visibility = 'public'
shared_network = True
allow_no_fip = True
+ task_timeout = '3600'
def __init__(self, **kwargs):
"""Initialize RallyBase object."""
@@ -524,7 +525,8 @@ class RallyBase(singlevm.VmReady2):
if self.file_is_empty(file_name):
LOGGER.info('No tests for scenario "%s"', test_name)
return False
- self.run_cmd = (["rally", "task", "start", "--abort-on-sla-failure",
+ self.run_cmd = (["timeout", "-t", self.task_timeout,
+ "rally", "task", "start", "--abort-on-sla-failure",
"--task", self.task_file, "--task-args",
str(self.build_task_args(test_name))])
return True
@@ -729,6 +731,7 @@ class RallyJobs(RallyBase):
"""Rally OpenStack CI testcase implementation."""
stests = ["neutron"]
+ task_timeout = '7200'
def __init__(self, **kwargs):
"""Initialize RallyJobs object."""
@@ -834,7 +837,8 @@ class RallyJobs(RallyBase):
os.makedirs(self.temp_dir)
task_file_name = os.path.join(self.temp_dir, task_name)
self.apply_blacklist(task, task_file_name)
- self.run_cmd = (["rally", "task", "start", "--task", task_file_name,
+ self.run_cmd = (["timeout", "-t", self.task_timeout,
+ "rally", "task", "start", "--task", task_file_name,
"--task-args", str(self.build_task_args(test_name))])
return True