Skip to content

Commit dfcbed0

Browse files
committed
fail faster on max attempts
1 parent e277521 commit dfcbed0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/e2e/utils/utils.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ def wait_for_container_health(container_name: str, max_attempts: int = 3) -> Non
5858
f"{container_name} not healthy after {max_attempts * 5} seconds"
5959
)
6060
except (subprocess.CalledProcessError, subprocess.TimeoutExpired):
61-
if attempt < max_attempts - 1:
62-
print(f"⏱ Attempt {attempt + 1}/{max_attempts} - waiting...")
63-
time.sleep(5)
64-
else:
65-
print(f"Could not check health status for {container_name}")
61+
pass
62+
63+
if attempt < max_attempts - 1:
64+
print(f"⏱ Attempt {attempt + 1}/{max_attempts} - waiting...")
65+
time.sleep(5)
66+
else:
67+
print(f"Could not check health status for {container_name}")
6668

6769

6870
def switch_config_and_restart(

0 commit comments

Comments
 (0)