summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-04-19 17:33:47 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-04-19 17:42:28 +0200
commit251024b29199ecee86661b8850751d982b7c5797 (patch)
treef7a77f809b1720697be020c439bc456b908a79e5
parent60192314ae2cd6d68925bf6f737701e735f5ae01 (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>
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py6
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