Skip to content
Snippets Groups Projects
Commit d3b8dc2c authored by Jan David Mol's avatar Jan David Mol
Browse files

Fix sleep when waiting for archive period

parent 80fafaac
No related branches found
No related tags found
1 merge request!546Fix sleep when waiting for archive period
......@@ -231,12 +231,12 @@ class TestArchiver(BaseIntegrationTestCase):
self.assertEqual(9, len(sdp_archived_attrs))
def _wait_for_archiving(
self, attr_fullname: str, archive_event_period: int, max_wait: int = 10
self, attr_fullname: str, archive_event_period_ms: int, max_wait: int = 10
):
wait = 0
records = self.retriever.get_lofar_attribute(attr_fullname)
while not (len(records) > 0) and wait < max_wait:
time.sleep(archive_event_period)
time.sleep(archive_event_period_ms / 1000.0)
records = self.retriever.get_lofar_attribute(attr_fullname)
wait += 1
return records
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment