Skip to content

Commit 3b83ce9

Browse files
authored
Fix CI Docker Compose test failure (#2284)
``` 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.
1 parent bd148a9 commit 3b83ce9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM redis
1+
FROM redis:2.6.17
22

33
CMD ["redis-server"]

core/src/test/resources/compose-build-test/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ services:
33
customredis:
44
build: .
55
normalredis:
6-
image: redis:latest
6+
image: redis:2.6.17

0 commit comments

Comments
 (0)