diff --git a/modules/kafka/src/main/java/org/testcontainers/kafka/KafkaHelper.java b/modules/kafka/src/main/java/org/testcontainers/kafka/KafkaHelper.java index 00b10a4d519..2de86af2402 100644 --- a/modules/kafka/src/main/java/org/testcontainers/kafka/KafkaHelper.java +++ b/modules/kafka/src/main/java/org/testcontainers/kafka/KafkaHelper.java @@ -37,10 +37,7 @@ static Map envVars() { Map envVars = new HashMap<>(); envVars.put("CLUSTER_ID", DEFAULT_CLUSTER_ID); - envVars.put( - "KAFKA_LISTENERS", - "PLAINTEXT://0.0.0.0:" + KAFKA_PORT + ",BROKER://0.0.0.0:9093,CONTROLLER://0.0.0.0:9094" - ); + envVars.put("KAFKA_LISTENERS", "PLAINTEXT://:" + KAFKA_PORT + ",BROKER://:9093,CONTROLLER://:9094"); envVars.put( "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP", "BROKER:PLAINTEXT,PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT" diff --git a/modules/kafka/src/test/java/org/testcontainers/kafka/KafkaContainerTest.java b/modules/kafka/src/test/java/org/testcontainers/kafka/KafkaContainerTest.java index b1764d3b522..3c069d8be68 100644 --- a/modules/kafka/src/test/java/org/testcontainers/kafka/KafkaContainerTest.java +++ b/modules/kafka/src/test/java/org/testcontainers/kafka/KafkaContainerTest.java @@ -13,7 +13,7 @@ public class KafkaContainerTest extends AbstractKafka { @Test public void testUsage() throws Exception { try ( // constructorWithVersion { - KafkaContainer kafka = new KafkaContainer("apache/kafka-native:3.8.0") + KafkaContainer kafka = new KafkaContainer("apache/kafka-native:3.9.0") // } ) { kafka.start();