From 848a56b3299f60b76fc0814367b324d91cd77ef0 Mon Sep 17 00:00:00 2001 From: Quentin Date: Fri, 8 Nov 2024 20:33:16 +0100 Subject: [PATCH] Fix: Update apache/kafka-native Docker tag to v3.9.0 --- src/main/resources/generator/dependencies/Dockerfile | 2 +- .../broker/kafka/KafkaTestContainerExtension.java.mustache | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/generator/dependencies/Dockerfile b/src/main/resources/generator/dependencies/Dockerfile index 30187d9c750..466226ba33e 100644 --- a/src/main/resources/generator/dependencies/Dockerfile +++ b/src/main/resources/generator/dependencies/Dockerfile @@ -9,7 +9,7 @@ FROM mysql:9.1.0 FROM cassandra:5.0.2 FROM mcr.microsoft.com/mssql/server:2022-latest FROM postgres:17.0 -FROM apache/kafka-native:3.8.1 +FROM apache/kafka-native:3.9.0 FROM tchiotludo/akhq:0.25.1 FROM apachepulsar/pulsar:4.0.0 FROM neo4j:5.25.1-community diff --git a/src/main/resources/generator/server/springboot/broker/kafka/KafkaTestContainerExtension.java.mustache b/src/main/resources/generator/server/springboot/broker/kafka/KafkaTestContainerExtension.java.mustache index 75c427a7c31..fd4c831a7d5 100644 --- a/src/main/resources/generator/server/springboot/broker/kafka/KafkaTestContainerExtension.java.mustache +++ b/src/main/resources/generator/server/springboot/broker/kafka/KafkaTestContainerExtension.java.mustache @@ -15,6 +15,8 @@ public class KafkaTestContainerExtension implements BeforeAllCallback { public void beforeAll(final ExtensionContext context) { if (!kafkaContainerStarted.get()) { kafkaContainer = new KafkaContainer(DockerImageName.parse("{{kafkaDockerImage}}")).withNetwork(null); + // TODO: waiting this issue https://github.com/testcontainers/testcontainers-java/issues/9506 + kafkaContainer.withEnv("KAFKA_LISTENERS", "PLAINTEXT://:9092,BROKER://:9093,CONTROLLER://:9094"); kafkaContainer.start(); kafkaContainerStarted.set(true); System.setProperty("kafka.bootstrap.servers", kafkaContainer.getBootstrapServers());