Skip to content

Commit 49d2516

Browse files
Merge pull request #293 from tillahoffmann/logs
More informative logs in `waiting_utils`.
2 parents c3a2b24 + 256c7a7 commit 49d2516

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

core/testcontainers/core/waiting_utils.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,15 @@ def wait_container_is_ready(*transient_exceptions):
4242

4343
@wrapt.decorator
4444
def wrapper(wrapped, instance, args, kwargs):
45+
from .container import DockerContainer
46+
47+
if isinstance(instance, DockerContainer):
48+
logger.info("Waiting for container %s with image %s to be ready ...",
49+
instance._container, instance.image)
50+
else:
51+
logger.info("Waiting for %s to be ready ...", instance)
52+
4553
exception = None
46-
logger.info("Waiting to be ready...")
4754
for attempt_no in range(config.MAX_TRIES):
4855
try:
4956
return wrapped(*args, **kwargs)

0 commit comments

Comments
 (0)