Hi there, I'm using python:3.8 image and trying to run unit test with pytest.
When time.sleep() method is called in order to retry http connection, the step abruptly stops without any error and log.
How can I debug or resolve this? Thanks
Pytest command
pipenv run pytest --capture=tee-sys
Code:
try:
with socket.create_connection((host, port), timeout=timeout):
logger.info(f"port={port} is ready")
break
except OSError as ex:
try:
logger.info("Performing an action which may throw an exception.")
logger.info(time.asctime())
time.sleep(3)
except:
logger.info("Everything looks great!")
finally:
logger.info(
"Finally is called directly after executing the try statement whether an exception is thrown or not.")
Output on the pipeline console:
