From 485424bb3c873cd672c45c70c4f87cc176115999 Mon Sep 17 00:00:00 2001 From: gmunozfe Date: Fri, 13 Dec 2024 00:57:44 +0100 Subject: [PATCH] [incubator-kie-issues-1682] Add kafka network alias --- .../java/org/kie/kogito/testcontainers/KogitoKafkaContainer.java | 1 + 1 file changed, 1 insertion(+) 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)); }