aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/instantiate/service_macro.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2021-03-19 16:20:59 +0000
committerGerrit Code Review <gerrit@onap.org>2021-03-19 16:20:59 +0000
commit2939e020dd9a7a34dd14b6b3c776f4d1e55d1328 (patch)
tree8d7247d650ba76b7b288e55f49e7fc267d5f831e /src/onaptests/steps/instantiate/service_macro.py
parent5e3ded022f3aa6de7594c1dcd8708d70bfc12fec (diff)
parent11eaf0bf2df74664ab9812d817e1d34e89112c0b (diff)
Merge "Timeout on orchestration requests"
Diffstat (limited to 'src/onaptests/steps/instantiate/service_macro.py')
-rw-r--r--src/onaptests/steps/instantiate/service_macro.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/onaptests/steps/instantiate/service_macro.py b/src/onaptests/steps/instantiate/service_macro.py
index 526eecc..14470f8 100644
--- a/src/onaptests/steps/instantiate/service_macro.py
+++ b/src/onaptests/steps/instantiate/service_macro.py
@@ -179,8 +179,13 @@ class YamlTemplateServiceMacroInstantiateStep(YamlTemplateBaseStep):
tenant=tenant,
service_instance_name=self.service_instance_name
)
- service_instantiation.wait_for_finish(timeout=settings.INSTANTIATION_TIMEOUT)
+ try:
+ service_instantiation.wait_for_finish(timeout=settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ except TimeoutError:
+ self._logger.error("Service instantiation %s timed out", self.service_instance_name)
+ raise onap_test_exceptions.ServiceInstantiateException
if service_instantiation.failed:
+ self._logger.error("Service instantiation %s failed", self.service_instance_name)
raise onap_test_exceptions.ServiceInstantiateException
else:
service_subscription: ServiceSubscription = customer.get_service_subscription_by_service_type(self.service_name)
@@ -195,7 +200,11 @@ class YamlTemplateServiceMacroInstantiateStep(YamlTemplateBaseStep):
"""
service_deletion = self._service_instance.delete()
- service_deletion.wait_for_finish(timeout=600)
+ try:
+ service_deletion.wait_for_finish(timeout=settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ except TimeoutError:
+ self._logger.error("Service deletion %s timed out", self._service_instance_name)
+ raise onap_test_exceptions.ServiceCleanupException
if service_deletion.finished:
self._logger.info("Service %s deleted", self._service_instance_name)
else: