diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-08-09 01:11:22 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-08-09 01:11:22 +0200 |
commit | c8efa5c800bcbeb94463c695a2918c69281065b0 (patch) | |
tree | 754503529754a97c937f5044bcfed8177d7af418 | |
parent | 215742d74eaa788c26bfabcaa8e5a368875692c1 (diff) |
Add timeout when running shaker
Else shaker may run until job timeout if deployment misconfigurations [1]
[1] https://jira.opnfv.org/browse/FUNCTEST-998
JIRA: FUNCTEST-998
Change-Id: I948ff8ffeeccdab637927614193d2c2ef03fe5c8
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | functest/opnfv_tests/openstack/shaker/shaker.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/shaker/shaker.py b/functest/opnfv_tests/openstack/shaker/shaker.py index bd0f51c50..c005df055 100644 --- a/functest/opnfv_tests/openstack/shaker/shaker.py +++ b/functest/opnfv_tests/openstack/shaker/shaker.py @@ -38,6 +38,7 @@ class Shaker(singlevm.SingleVm2): port = 9000 ssh_connect_loops = 12 create_server_timeout = 300 + shaker_timeout = '3600' def __init__(self, **kwargs): super(Shaker, self).__init__(**kwargs) @@ -90,7 +91,7 @@ class Shaker(singlevm.SingleVm2): 'export OS_PASSWORD={} && ' '{}' 'env && ' - 'shaker --image-name {} --flavor-name {} ' + 'timeout {} shaker --image-name {} --flavor-name {} ' '--server-endpoint {}:9000 --scenario ' 'openstack/full_l2,' 'openstack/full_l3_east_west,' @@ -101,7 +102,7 @@ class Shaker(singlevm.SingleVm2): self.project.project.id, self.project.password, 'export OS_CACERT=~/os_cacert && ' if os.environ.get( 'OS_CACERT') else '', - self.image.name, self.flavor.name, + self.shaker_timeout, self.image.name, self.flavor.name, self.fip.floating_ip_address)) self.__logger.info("output:\n%s", stdout.read()) self.__logger.info("error:\n%s", stderr.read()) |