Skip to content

Commit 8f949f9

Browse files
committed
Lengthen timeout
1 parent d725b4e commit 8f949f9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

smoketests/docker.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,21 @@ def restart_docker():
2626

2727
# Ensure all nodes are running.
2828
attempts = 0
29-
while attempts < 5:
29+
while attempts < 10:
3030
attempts += 1
31-
if all(container.is_running(docker, spacetimedb_ping_url) for container in containers):
31+
containers_alive = {
32+
container.name: container.is_running(docker, spacetimedb_ping_url)
33+
for container in containers
34+
}
35+
if all(containers_alive.values()):
3236
# sleep a bit more to allow for leader election etc
3337
# TODO: make ping endpoint consider all server state
3438
time.sleep(2)
3539
return
3640
else:
3741
time.sleep(1)
3842

39-
raise Exception("Not all containers are up and running")
43+
raise Exception(f"Not all containers are up and running: {containers_alive!r}")
4044

4145
def spacetimedb_ping_url(port: int) -> str:
4246
return f"http://127.0.0.1:{port}/v1/ping"

0 commit comments

Comments
 (0)