diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2021-05-11 13:04:10 +0000 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2021-05-11 13:06:56 +0000 |
commit | 3f016d80eb03011339949abbc41ff33b06d09faa (patch) | |
tree | 4d735ae052a8bff67f3b52093057f7e0fe42d89a /src/onaptests/steps/simulator | |
parent | 227f55ed67caec8e67a037bc3e901caf54617c4c (diff) |
[TEST] Catch ConnectionError exception during pnf simulator startup
When PNF simulator starts up a series of requests are sent but if ConnectionError is raised
then tests is interrupted and no report is generated
Issue-ID: TEST-337
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I5dbdfa3b7d5a2c16b3ecc00ae4ab46ac3bb5443f
Diffstat (limited to 'src/onaptests/steps/simulator')
-rw-r--r-- | src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py b/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py index c1d76b0..035d731 100644 --- a/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py +++ b/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py @@ -110,7 +110,7 @@ class PnfSimulatorCnfRegisterStep(BaseStep): response.raise_for_status() registered_successfully = True self._logger.info(f"PNF registered with {settings.SERVICE_INSTANCE_NAME} source name") - except requests.HTTPError as http_error: + except (requests.ConnectionError, requests.HTTPError) as http_error: self._logger.debug(f"Can't connect with PNF simulator: {str(http_error)}") registration_number = registration_number + 1 time.sleep(settings.PNF_WAIT_TIME) |