From d585c211755717d30296ca7a5614d797abcaebde Mon Sep 17 00:00:00 2001 From: Alan Malta Rodrigues Date: Thu, 16 Jun 2022 21:38:33 -0400 Subject: [PATCH] Give enough time for replication to complete in unit tests --- src/python/WMCore/WorkQueue/WorkQueueBackend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/python/WMCore/WorkQueue/WorkQueueBackend.py b/src/python/WMCore/WorkQueue/WorkQueueBackend.py index 74dc4c94df..a23c00a180 100644 --- a/src/python/WMCore/WorkQueue/WorkQueueBackend.py +++ b/src/python/WMCore/WorkQueue/WorkQueueBackend.py @@ -86,7 +86,7 @@ def forceQueueSync(self): self.sendToParent(continuous=True) def pullFromParent(self, continuous=True, cancel=False): - """Replicate from parent couch - blocking: used only int test""" + """Replicate from parent couch - blocking: used only in unit tests""" try: if self.parentCouchUrlWithAuth and self.queueUrlWithAuth: self.logger.info("Forcing pullFromParent from parentCouch: %s to queueUrl %s/%s", @@ -97,7 +97,8 @@ def pullFromParent(self, continuous=True, cancel=False): query_params={'childUrl': self.queueUrl, 'parentUrl': self.parentCouchUrl}, continuous=continuous, - cancel=cancel) + cancel=cancel, + sleepSecs=6) except Exception as ex: self.logger.warning('Replication from %s failed: %s' % (self.parentCouchUrlWithAuth, str(ex)))