From aef237da4b2d13ad7415d16fa33634f0c42a77aa Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 5 Mar 2024 11:54:03 +0100 Subject: [PATCH] workaround oci env No-Issue --- .../tests/integration/utils/pulp_interfaces.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/galaxy_ng/tests/integration/utils/pulp_interfaces.py b/galaxy_ng/tests/integration/utils/pulp_interfaces.py index ebcec5db34..cda6ef2c0b 100644 --- a/galaxy_ng/tests/integration/utils/pulp_interfaces.py +++ b/galaxy_ng/tests/integration/utils/pulp_interfaces.py @@ -1,5 +1,7 @@ import time +from ansible.galaxy.api import GalaxyError + from galaxy_ng.tests.integration.utils import ( wait_for_task, wait_for_all_tasks ) @@ -22,7 +24,15 @@ def cleanup(self): except: # noqa pass - wait_for_all_tasks(self.client) + # FIXME - the POST call will often result in an error with the oci+insights profile ... + retries = 10 + for x in range(0, retries): + try: + wait_for_all_tasks(self.client) + break + except GalaxyError as e: + print(e) + time.sleep(5) self.cleanup_hrefs = [] @@ -74,7 +84,7 @@ def create(self): time.sleep(5) if _repo is None: - raise Exception("failed to create repo and dist") + raise Exception("failed to create repo") self._repo = _repo resp = self.client(