testcontainers / testcontainers/testcontainers-java
Allow for graceful container stop
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
Currently I see only 1 method to stop a running testcontainer: org.testcontainers.containers.GenericContainer#stop. But to my great surprise and dismay that method ends up calling dockerClient.killContainerCmd. So there is no way for graceful shutdown of running container which would allow for the application running inside it to perform any expected cleanup.
Please, provide a graceful stop.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at org.testcontainers.containers.GenericContainer#stop and trace its call to dockerClient.killContainerCmd. Review the container stop behavior and determine the graceful-stop API needed for applications to perform cleanup. Done means a running test container can be stopped gracefully while retaining the existing stop behavior where appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100