docker-compose-rule
docker-compose-rule copied to clipboard
Containers aren't shut down when cluster waits fails
When using JUnit4 @ClassRule, containers aren't shut down when cluster native health checks or custom cluster wait checks fails.
Problem: @ClassRule doesn't fire @ BeforeClass/@ AfterClass methods, so we can't shutdown the failed startup manually.
Output:
Running com.xxx
15:43:03.586 [main] DEBUG com.palantir.docker.compose.execution.DockerComposeExecutable - Using docker-compose found at /usr/local/bin/docker-compose
15:43:03.589 [main] DEBUG com.palantir.docker.compose.execution.DockerExecutable - Using docker found at /usr/local/bin/docker
15:43:03.602 [main] DEBUG com.palantir.docker.compose.DockerComposeRule - Starting docker-compose cluster
15:43:05.978 [main] DEBUG com.palantir.docker.compose.DockerComposeRule - Waiting for services
15:43:05.980 [main] INFO com.palantir.docker.compose.connection.waiting.ClusterWait - Waiting for cluster to be healthy
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 77.772 s <<< FAILURE!
java.lang.IllegalStateException: The cluster failed to pass a startup check: The following containers are not healthy: dm
Think this is the same issue as https://github.com/palantir/docker-compose-rule/issues/165
I am experiencing exactly the same issue. Is there any workaround or plan to fix this? Thx.