diff --git a/kogito-test-utils/src/main/java/org/kie/kogito/testcontainers/KogitoKafkaContainer.java b/kogito-test-utils/src/main/java/org/kie/kogito/testcontainers/KogitoKafkaContainer.java index 72c594d4f8f..69f3e2285de 100644 --- a/kogito-test-utils/src/main/java/org/kie/kogito/testcontainers/KogitoKafkaContainer.java +++ b/kogito-test-utils/src/main/java/org/kie/kogito/testcontainers/KogitoKafkaContainer.java @@ -47,6 +47,7 @@ public KogitoKafkaContainer() { withExposedPorts(KAFKA_PORT); withCreateContainerCmdModifier(cmd -> cmd.withEntrypoint("sh")); withCommand("-c", "while [ ! -f " + STARTER_SCRIPT + " ]; do sleep 0.1; done; " + STARTER_SCRIPT); + withNetworkAliases("kafka"); waitingFor(Wait.forLogMessage(".*Started Kafka API server.*", 1).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT)); }