Skip to content

Commit e1ce780

Browse files
authored
fix(test): move reading env variable inside method (#12549)
1 parent a4f64fd commit e1ce780

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

smoke-test/tests/consistency_utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@ def infer_kafka_broker_container() -> str:
2727
return lines[0]
2828

2929

30-
KAFKA_BROKER_CONTAINER: str = str(
31-
os.getenv("KAFKA_BROKER_CONTAINER", infer_kafka_broker_container())
32-
)
33-
34-
3530
def wait_for_writes_to_sync(max_timeout_in_sec: int = 120) -> None:
3631
if USE_STATIC_SLEEP:
3732
time.sleep(ELASTICSEARCH_REFRESH_INTERVAL_SECONDS)
3833
return
34+
KAFKA_BROKER_CONTAINER: str = str(
35+
os.getenv("KAFKA_BROKER_CONTAINER", infer_kafka_broker_container())
36+
)
3937
start_time = time.time()
4038
# get offsets
4139
lag_zero = False

0 commit comments

Comments
 (0)