Skip to content

Commit bad07d1

Browse files
committed
Cleanup resources of container failed to start
Otherwise, ghost container left after retryUntilSuccess.
1 parent 77a423c commit bad07d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/java/org/testcontainers/containers/GenericContainer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ private void tryStart() {
550550
} else {
551551
logger().error("There are no stdout/stderr logs available for the failed container");
552552
}
553+
stop();
553554
}
554555

555556
throw new ContainerLaunchException("Could not create/start container", e);

0 commit comments

Comments
 (0)