Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Commit 5a5edf4

Browse files
committed
Increase docker API timeout
While we started testing parallel usage we discovered that the 5 seconds timeout was too small. Increating this to 10s to assure it does not fail. In the future we may want to make it configurable or to default to 60 seconds which is the current default on python docker api client.
1 parent 9980a92 commit 5a5edf4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pytest_molecule/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ def pytest_configure(config):
1111

1212
import docker
1313

14-
# validate docker conectivity
15-
c = docker.from_env(timeout=5, version="auto")
14+
# validate docker connectivity
15+
# Default docker value is 60s but we want to fail faster
16+
# With parallel execution 5s proved to give errors.
17+
c = docker.from_env(timeout=10, version="auto")
1618
if not c.ping():
1719
raise Exception("Failed to ping docker server.")
1820

0 commit comments

Comments
 (0)