Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix javadoc for stop method #6834

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,30 @@ private void connectToPortForwardingNetwork(String networkMode) {
}

/**
* Stops the container.
* Kills the container and removes it from Docker.
*
* <p>In most situations, killing the container is the correct course of action in a test environment.
* This is how Ryuk stops containers.
*
* <p>If a more graceful shutdown is required, interact with the container's docker client directly:
*
* <pre>
* container
* .getDockerClient()
* .stopContainerCmd(container.getContainerId())
* .withTimeout(timeout)
* .exec();
* </pre>
*
* <p>or, if control of the signal sent, consider using the kill command directly:
*
* <pre>
* container
* .getDockerClient()
* .killContainerCmd(container.getContainerId())
* .withSignal("HUP")
* .exec();
* </pre>
eddumelendez marked this conversation as resolved.
Show resolved Hide resolved
*/
@Override
public void stop() {
Expand Down