Skip to content

Commit 12af852

Browse files
retry config
1 parent 79ee67e commit 12af852

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/integ/test_container.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
client = docker.DockerClient(base_url='unix://var/run/docker.sock')
2121

22-
2322
def make_sure_other_containers_are_stopped(client: DockerClient, container_name: str):
2423
try:
2524
previous = client.containers.get(container_name)
@@ -45,8 +44,8 @@ def wait_for_container_to_be_ready(base_url):
4544

4645
@tenacity.retry(
4746
wait = tenacity.wait_random(min=1, max=2),
48-
retry = tenacity.retry_if_exception(requests.exception.ConnectionError),
49-
stop = tenacity.retry.stop_after_attempt(5)
47+
retry = tenacity.retry_if_exception(requests.exceptions.ConnectionError),
48+
stop = tenacity.stop_after_attempt(5)
5049
)
5150
def verify_task(container: DockerClient, task: str, port: int = 5000, framework: str = "pytorch"):
5251
BASE_URL = f"http://localhost:{port}"

0 commit comments

Comments
 (0)