Class ContainerShutdownCloseable
- java.lang.Object
-
- io.quarkiverse.unleash.devservices.ContainerShutdownCloseable
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ContainerShutdownCloseable extends Object implements Closeable
Helper to define the stop strategy for containers created by DevServices. In particular, we don't want to actually stop the containers when they have been flagged for reuse, and when the Testcontainers configuration has been explicitly set to allow container reuse. To enable reuse, ass testcontainers.reuse.enable=true in your .testcontainers.properties file, to be stored in your home.- See Also:
- Reusable Containers, Testcontainers Configuration.
-
-
Constructor Summary
Constructors Constructor Description ContainerShutdownCloseable(org.testcontainers.containers.GenericContainer<?> container, String friendlyServiceName)
-
-
-
Constructor Detail
-
ContainerShutdownCloseable
public ContainerShutdownCloseable(org.testcontainers.containers.GenericContainer<?> container, String friendlyServiceName)- Parameters:
container- the container to be eventually closedfriendlyServiceName- for logging purposes
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-