From 0ecd63c061dd49cda31cc90c7a5ed8725c1307ed Mon Sep 17 00:00:00 2001 From: James Tanner Date: Fri, 29 Mar 2024 15:22:20 -0400 Subject: [PATCH] Try waiting longer for community collection tests. No-Issue Signed-off-by: James Tanner --- .../community/test_community_api.py | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/galaxy_ng/tests/integration/community/test_community_api.py b/galaxy_ng/tests/integration/community/test_community_api.py index ec5ec66770..1551ab7dee 100644 --- a/galaxy_ng/tests/integration/community/test_community_api.py +++ b/galaxy_ng/tests/integration/community/test_community_api.py @@ -4,6 +4,7 @@ import json import pytest import subprocess +import time from ansible.errors import AnsibleError @@ -276,9 +277,13 @@ def test_social_auth_delete_collection(ansible_config): token=client.get_hub_token(), ) - exists_resp = client.get( - f"v3/plugin/ansible/content/published/collections/index/{namespace}/{name}/" - ) + for x in range(0, 20): + exists_resp = client.get( + f"v3/plugin/ansible/content/published/collections/index/{namespace}/{name}/" + ) + if exists_resp.status_code == 200: + break + time.sleep(5) assert exists_resp.status_code == 200 del_resp = client.delete( @@ -329,9 +334,13 @@ def test_social_auth_deprecate_collection(ansible_config): token=client.get_hub_token(), ) - exists_resp = client.get( - f"v3/plugin/ansible/content/published/collections/index/{namespace}/{name}/" - ) + for x in range(0, 20): + exists_resp = client.get( + f"v3/plugin/ansible/content/published/collections/index/{namespace}/{name}/" + ) + if exists_resp.status_code == 200: + break + time.sleep(5) assert exists_resp.status_code == 200 dep_resp = client.patch(