Skip to content
This repository was archived by the owner on Oct 30, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion tests/mock_vws/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,19 @@ def _free_port() -> int:


@beartype
@retry(
retry=retry_if_exception_type(exception_types=(KeyError, IndexError)),
wait=wait_fixed(wait=0.1),
stop=stop_after_delay(max_delay=10),
reraise=True,
)
def _published_base_url(*, container: Container) -> str:
"""Return the host-reachable base URL of a container."""
"""Return the host-reachable URL once Docker reports its port binding.

Docker Desktop can return an empty binding list immediately after a
container starts. Reloading on each bounded retry lets it finish
publishing the port before the readiness probes use the URL.
"""
container.reload()
bindings = container.ports["5000/tcp"]
assert bindings is not None
Expand Down
Loading