docker-compose-rule icon indicating copy to clipboard operation
docker-compose-rule copied to clipboard

Containers aren't shut down when cluster waits fails

Open panga opened this issue 7 years ago • 2 comments

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

panga avatar Sep 06 '17 18:09 panga

Think this is the same issue as https://github.com/palantir/docker-compose-rule/issues/165

fryz avatar Apr 20 '18 19:04 fryz

I am experiencing exactly the same issue. Is there any workaround or plan to fix this? Thx.

bkalas avatar Jul 03 '18 18:07 bkalas