You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrading to Docker Desktop 3.2.2 our tests using DockerComposeContainer started to fail when using docker-compose with dynamic ports. The error message is something like:
Timed out waiting for container port to open (localhost ports: [0, 55196] should be listening)
Debugging the code you can see that port 0 is reported and then ExternalPortListeningCheck fails because it tries to open a connection to localhost:0
As a workaround we are using this fix for HostPortWaitStrategy:
classHostPortWaitStrategyFixForDockerDesktop322 : HostPortWaitStrategy() {
overridefungetLivenessCheckPorts(): MutableSet<Int> {
returnsuper.getLivenessCheckPorts().stream()
.filter { port -> port >0 }
.collect(Collectors.toSet())
}
}