mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-08 15:30:55 +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 time
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
_ELASTIC_BUFFER_WRITES_TIME_IN_SEC: int = 1
|
_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:
|
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()
|
start_time = time.time()
|
||||||
# get offsets
|
# get offsets
|
||||||
lag_zero = False
|
lag_zero = False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user