docker-maven-plugin
docker-maven-plugin copied to clipboard
<run><wait> no longer working correctly
Description
We've updated from 0.43.4 to 0.44.0, and our tests are failing as they no longer wait for the dependent container to startup.
Info
- docker-maven-plugin version : 0.44.0
- Maven version (
mvn -v
) :
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /usr/local/Cellar/maven/3.9.6/libexec
Java version: 17.0.5, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "13.6.4", arch: "x86_64", family: "mac"
- Docker version : 25.0.3,
- If it's a bug, how to reproduce : Create a test that has the following container configuration:
<execution>
<id>start-context-env</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<images>
<image>
<alias>my-container</alias>
<external>
<ignoreBuild>true</ignoreBuild>
<type>compose</type>
</external>
<run>
<wait>
<http>
<method>GET</method>
<url>http://${docker.host.address}:8080/</url>
</http>
<time>3600000</time>
</wait>
</run>
</image>
</images>
<imagePullPolicy>IfNotPresent</imagePullPolicy>
</configuration>
</execution>
- Run the container manually, and confirm that it takes a few seconds to start
- Confirm that a GET check to http://${docker.host.address}:8080/ does not respond
- Now run as part of the maven lifecycle
- The system continues instantly with the subsequent tests without waiting for the endpoint to be up
- Downgrading to 0.43.4 fixes the issue