diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-04-19 17:33:47 +0200 |
---|---|---|
committer | Cedric Ollivier <cedric.ollivier@orange.com> | 2018-04-19 19:02:19 +0000 |
commit | 18b3dbc1c3e9bc744507248b1f0a28f35652fc35 (patch) | |
tree | 4e00458a2b0f3ed219f3438b76b1bae2927b71d0 | |
parent | 78d628c929b02112dfb86dc9dfe9830ed1d5f975 (diff) |
Use timeout to wrap juju-wait
It allows getting logs as releng doesn't push them if global timeout.
Change-Id: I4bbb3818feff37d29b4ccd586f3e940380feef2e
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 251024b29199ecee86661b8850751d982b7c5797)
-rw-r--r-- | functest/opnfv_tests/vnf/epc/juju_epc.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py index a60d4f51e..1ba883d40 100644 --- a/functest/opnfv_tests/vnf/epc/juju_epc.py +++ b/functest/opnfv_tests/vnf/epc/juju_epc.py @@ -82,6 +82,8 @@ class JujuEpc(vnf.VnfOnBoarding): __logger = logging.getLogger(__name__) + juju_wait_timeout = '3600' + def __init__(self, **kwargs): if "case_name" not in kwargs: kwargs["case_name"] = "juju_epc" @@ -336,7 +338,7 @@ class JujuEpc(vnf.VnfOnBoarding): output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) self.__logger.info("%s\n%s", " ".join(cmd), output) self.__logger.info("Waiting for instances .....") - cmd = ['juju-wait'] + cmd = ['timeout', '-t', JujuEpc.juju_wait_timeout, 'juju-wait'] output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) self.__logger.info("%s\n%s", " ".join(cmd), output) self.__logger.info("Deployed Abot-epc on Openstack") @@ -382,7 +384,7 @@ class JujuEpc(vnf.VnfOnBoarding): 'tagnames={}'.format(self.details['test_vnf']['tag_name'])] output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) self.__logger.info("%s\n%s", " ".join(cmd), output) - cmd = ['juju-wait'] + cmd = ['timeout', '-t', JujuEpc.juju_wait_timeout, 'juju-wait'] output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) self.__logger.info("%s\n%s", " ".join(cmd), output) duration = time.time() - start_time |