mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-01 11:19:05 +00:00
chore(ci): add back optional static sleep for tests (#8258)
This commit is contained in:
parent
a5ee1cae62
commit
3de94c5223
@ -1,8 +1,15 @@
|
||||
import time
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
_ELASTIC_BUFFER_WRITES_TIME_IN_SEC: int = 1
|
||||
USE_STATIC_SLEEP: bool = bool(os.getenv("USE_STATIC_SLEEP", False))
|
||||
ELASTICSEARCH_REFRESH_INTERVAL_SECONDS: int = int(os.getenv("ELASTICSEARCH_REFRESH_INTERVAL_SECONDS", 5))
|
||||
|
||||
def wait_for_writes_to_sync(max_timeout_in_sec: int = 120) -> None:
|
||||
if USE_STATIC_SLEEP:
|
||||
time.sleep(ELASTICSEARCH_REFRESH_INTERVAL_SECONDS)
|
||||
return
|
||||
start_time = time.time()
|
||||
# get offsets
|
||||
lag_zero = False
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user