FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Double docker-compose shutdown · Issue #342 · testcontainers/testcontainers-java · GitHub

Double docker-compose shutdown #342

Description

I've encountered strange behaviour of DockerComposeContainer class. After a test run in a clean up stage TestContainers logs exception org.testcontainers.shaded.com.github.dockerjava.api.exception.NotFoundException: {"message":"No such container: 36ae55e90e479816118eddda6db1a9704a170cf3272ea94aafedd7831e14ad7e"}. It happens because method DockerComposeContainer.finished first stops ambassador container, then shuts down docker-compose, and finally kills spawned service containers (https://github.com/testcontainers/testcontainers-java/blob/master/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java#L250). And it looks strange to me as service containers must be already stopped with docker-compose down -v on the previous step (L 243).

Richard and I have discussed this moment via e-mail and he proposed to do one or both of following things:

  • use the exit code from docker-compose down to know whether the final cleanup is actually needed
  • check if container is still running before taking attempt to stop it

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL