Class ContainerEnvironmentUtil
java.lang.Object
org.apache.camel.test.infra.common.services.ContainerEnvironmentUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconfigureContainerStartup(org.testcontainers.containers.GenericContainer<?> container, String property, int defaultValue) static StringcontainerName(Class cls) static booleanstatic booleanisFixedPort(Class cls) Determines if a service class should use fixed ports (for Camel JBang compatibility) or random ports (for testcontainer isolation).
-
Field Details
-
STARTUP_ATTEMPTS_PROPERTY
- See Also:
-
-
Method Details
-
isDockerAvailable
public static boolean isDockerAvailable() -
configureContainerStartup
public static void configureContainerStartup(org.testcontainers.containers.GenericContainer<?> container, String property, int defaultValue) -
isFixedPort
Determines if a service class should use fixed ports (for Camel JBang compatibility) or random ports (for testcontainer isolation). Services implementing an interface with "InfraService" in the name are considered to be intended for use with Camel JBang and will use fixed default ports.- Parameters:
cls- the service class to check- Returns:
- true if the service should use fixed ports, false for random ports
-
containerName
-