Skip to content

Commit 5e590e7

Browse files
authored
Reduce Kafka container startup timeout to 3 minutes
1 parent e063779 commit 5e590e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

generators/spring-cloud/generators/kafka/templates/src/test/java/_package_/config/KafkaTestContainer.java.ejs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import org.testcontainers.junit.jupiter.Container;
3131
public interface KafkaTestContainer {
3232
@Container
3333
KafkaContainer kafkaContainer = new KafkaContainer("<%- dockerContainers.kafka %>")
34-
.withStartupTimeout(Duration.ofMinutes(6))
34+
.withStartupTimeout(Duration.ofMinutes(3))
35+
.withStartupAttempts(2)
3536
.withEnv("KAFKA_LISTENERS", "PLAINTEXT://:9092,BROKER://:9093,CONTROLLER://:9094")
3637
.withLogConsumer(new Slf4jLogConsumer(LoggerFactory.getLogger(KafkaTestContainer.class)));
3738

0 commit comments

Comments
 (0)