From 62af55f41c6f56efd063351a743e5e01a1d6945c Mon Sep 17 00:00:00 2001 From: David Moore Date: Thu, 15 Feb 2024 08:31:21 -0500 Subject: [PATCH] nan --- robottelo/host_helpers/capsule_mixins.py | 2 +- tests/foreman/api/test_capsulecontent.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/robottelo/host_helpers/capsule_mixins.py b/robottelo/host_helpers/capsule_mixins.py index a38868a2b65..39c9ac4986f 100644 --- a/robottelo/host_helpers/capsule_mixins.py +++ b/robottelo/host_helpers/capsule_mixins.py @@ -110,7 +110,7 @@ def wait_for_sync(self, timeout=600, start_time=None): f'One or more sync tasks have failed for capsule {self.hostname},' f' {sync_status["last_failed_sync_tasks"]}' ) - # there was a prior active sync, when polled had finished: + # there were prior active sync task(s), when polled had finished: # assert current status last_sync_time updated to on or after start_time # assert current status shows no active sync tasks remaining if ongoing_sync: diff --git a/tests/foreman/api/test_capsulecontent.py b/tests/foreman/api/test_capsulecontent.py index 1db528e0284..02dafc304c9 100644 --- a/tests/foreman/api/test_capsulecontent.py +++ b/tests/foreman/api/test_capsulecontent.py @@ -257,12 +257,13 @@ def test_positive_sync_updated_repo( assert len(cv.version) == 1 cvv = cv.version[-1].read() + timestamp = datetime.utcnow() cvv.promote(data={'environment_ids': function_lce.id}) + module_capsule_configured.wait_for_sync(start_time=timestamp) + cvv = cvv.read() assert len(cvv.environment) == 2 - module_capsule_configured.wait_for_sync() - # Upload more content to the repository with open(DataFile.SRPM_TO_UPLOAD, 'rb') as handle: repo.upload_content(files={'content': handle}) @@ -276,12 +277,13 @@ def test_positive_sync_updated_repo( cv.version.sort(key=lambda version: version.id) cvv = cv.version[-1].read() + timestamp = datetime.utcnow() cvv.promote(data={'environment_ids': function_lce.id}) + module_capsule_configured.wait_for_sync() + cvv = cvv.read() assert len(cvv.environment) == 2 - module_capsule_configured.wait_for_sync() - # Check the content is synced on the Capsule side properly sat_repo_url = target_sat.get_published_repo_url( org=function_org.label,