Class ContainerEnvironmentUtil

java.lang.Object
org.apache.camel.test.infra.common.services.ContainerEnvironmentUtil

public final class ContainerEnvironmentUtil extends Object
  • Field Details

  • Method Details

    • isDockerAvailable

      public static boolean isDockerAvailable()
    • configureContainerStartup

      public static void configureContainerStartup(org.testcontainers.containers.GenericContainer<?> container, String property, int defaultValue)
    • isFixedPort

      public static boolean isFixedPort(Class cls)
      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

      public static String containerName(Class cls)