Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<run><wait> no longer working correctly #1771

Open
ben-gineer opened this issue Mar 14, 2024 · 0 comments
Open

<run><wait> no longer working correctly #1771

ben-gineer opened this issue Mar 14, 2024 · 0 comments

Comments

@ben-gineer
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant