Class OnDemandTCIFactory<C extends org.testcontainers.containers.GenericContainer<C>,I extends TCI<C>>
java.lang.Object
software.xdev.tci.factory.BaseTCIFactory<C,I>
software.xdev.tci.factory.ondemand.OnDemandTCIFactory<C,I>
- All Implemented Interfaces:
AutoCloseable,TCIFactory<C,I>
public class OnDemandTCIFactory<C extends org.testcontainers.containers.GenericContainer<C>,I extends TCI<C>>
extends BaseTCIFactory<C,I>
A simple implementation of
TCIFactory.
Creates new infrastructure on demand and allows customizing the container.
It's recommended to use this for certain infrastructure that is only required for a few tests and that uses stateful container starts.
-
Field Summary
FieldsFields inherited from class software.xdev.tci.factory.BaseTCIFactory
containerBaseName, containerBuilder, containerLoggerName, getNewTryCount, infraBuilder, returnedAndInUse, tracer, warmedUp -
Constructor Summary
ConstructorsConstructorDescriptionOnDemandTCIFactory(BiFunction<C, String, I> infraBuilder, Supplier<C> containerBuilder, String containerBaseName, String containerLoggerName) -
Method Summary
Methods inherited from class software.xdev.tci.factory.BaseTCIFactory
buildContainer, close, getLogConsumer, getReturnedAndInUse, getTracer, handleInfraStartFail, log, registerReturned, setGetNewTryCount, warmUp, warmUpInternal, warmUpSyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.xdev.tci.factory.TCIFactory
getFactoryName, register, unregister
-
Field Details
-
startCounter
-
-
Constructor Details
-
OnDemandTCIFactory
-
-
Method Details
-
newInternal
-
getNew
-
getNew
-