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

Fix CI Docker Compose test failure #2284

Merged
merged 1 commit into from Jan 24, 2020
Merged

Conversation

rnorth
Copy link
Member

@rnorth rnorth commented Jan 24, 2020

Seeing this failure in CI:

org.testcontainers.junit.DockerComposeContainerWithBuildTest > performTest[removeMode = ALL] FAILED
    java.lang.RuntimeException: java.lang.AssertionError: the pulled image is present after running: 'true' does not equal expected 'false'
        at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:68)
        at org.rnorth.ducttape.timeouts.Timeouts.getWithTimeout(Timeouts.java:43)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:40)
        at org.testcontainers.junit.DockerComposeContainerWithBuildTest.performTest(DockerComposeContainerWithBuildTest.java:72)

        Caused by:
        java.lang.AssertionError: the pulled image is present after running: 'true' does not equal expected 'false'
            at org.rnorth.visibleassertions.VisibleAssertions.fail(VisibleAssertions.java:440)
            at org.rnorth.visibleassertions.VisibleAssertions.assertEquals(VisibleAssertions.java:174)
            at org.testcontainers.junit.DockerComposeContainerWithBuildTest.lambda$performTest$1(DockerComposeContainerWithBuildTest.java:74)

Hypothesis: docker-compose cannot remove the redis (latest) image because there is some other running container that relies on that image. This may be a CI-specific problem depending on the Azure Pipelines Docker setup.

To work around (without publishing our own single-use image): use an old version of the Redis image that is unlikely to be in use by concurrent builds.

```
org.testcontainers.junit.DockerComposeContainerWithBuildTest > performTest[removeMode = ALL] FAILED
    java.lang.RuntimeException: java.lang.AssertionError: the pulled image is present after running: 'true' does not equal expected 'false'
        at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:68)
        at org.rnorth.ducttape.timeouts.Timeouts.getWithTimeout(Timeouts.java:43)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:40)
        at org.testcontainers.junit.DockerComposeContainerWithBuildTest.performTest(DockerComposeContainerWithBuildTest.java:72)

        Caused by:
        java.lang.AssertionError: the pulled image is present after running: 'true' does not equal expected 'false'
            at org.rnorth.visibleassertions.VisibleAssertions.fail(VisibleAssertions.java:440)
            at org.rnorth.visibleassertions.VisibleAssertions.assertEquals(VisibleAssertions.java:174)
            at org.testcontainers.junit.DockerComposeContainerWithBuildTest.lambda$performTest$1(DockerComposeContainerWithBuildTest.java:74)
```

Hypothesis: docker-compose cannot remove the `redis` (latest) image because there is some other running container that relies on that image. This may be a CI-specific problem depending on the Azure Pipelines Docker setup.

To work around (without publishing our own single-use image): use an old version of the Redis image that is unlikely to be in use by concurrent builds.
@rnorth
Copy link
Member Author

rnorth commented Jan 24, 2020

Obviously I'd prefer it if we weren't relying on the obscurity of an image...

@rnorth rnorth merged commit 3b83ce9 into master Jan 24, 2020
@rnorth rnorth deleted the fix-ci-compose-test-failure branch January 24, 2020 09:57
@rnorth rnorth added this to the 1.13.0 milestone Mar 5, 2020
quincy pushed a commit to quincy/testcontainers-java that referenced this pull request May 28, 2020
```
org.testcontainers.junit.DockerComposeContainerWithBuildTest > performTest[removeMode = ALL] FAILED
    java.lang.RuntimeException: java.lang.AssertionError: the pulled image is present after running: 'true' does not equal expected 'false'
        at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:68)
        at org.rnorth.ducttape.timeouts.Timeouts.getWithTimeout(Timeouts.java:43)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:40)
        at org.testcontainers.junit.DockerComposeContainerWithBuildTest.performTest(DockerComposeContainerWithBuildTest.java:72)

        Caused by:
        java.lang.AssertionError: the pulled image is present after running: 'true' does not equal expected 'false'
            at org.rnorth.visibleassertions.VisibleAssertions.fail(VisibleAssertions.java:440)
            at org.rnorth.visibleassertions.VisibleAssertions.assertEquals(VisibleAssertions.java:174)
            at org.testcontainers.junit.DockerComposeContainerWithBuildTest.lambda$performTest$1(DockerComposeContainerWithBuildTest.java:74)
```

Hypothesis: docker-compose cannot remove the `redis` (latest) image because there is some other running container that relies on that image. This may be a CI-specific problem depending on the Azure Pipelines Docker setup.

To work around (without publishing our own single-use image): use an old version of the Redis image that is unlikely to be in use by concurrent builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants