From 62179989920efa36a7696dd86fadceacdc9df3c9 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Thu, 26 Dec 2024 11:13:21 -0500 Subject: [PATCH] [6.16.z] added wait for tasks for repo creation (#17228) --- tests/foreman/api/test_docker.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/foreman/api/test_docker.py b/tests/foreman/api/test_docker.py index 3e1f9ae270a..3a24c2d58fb 100644 --- a/tests/foreman/api/test_docker.py +++ b/tests/foreman/api/test_docker.py @@ -53,7 +53,15 @@ def _create_repository(module_target_sat, product, name=None, upstream_name=None @pytest.fixture def repo(module_product, module_target_sat): """Create a single repository.""" - return _create_repository(module_target_sat, module_product) + repo = _create_repository(module_target_sat, module_product) + module_target_sat.wait_for_tasks( + search_query='Actions::Katello::Repository::MetadataGenerate' + f' and resource_id = {repo.id}' + ' and resource_type = Katello::Repository', + max_tries=6, + search_rate=10, + ) + return repo @pytest.fixture