From b1801a98907ed79caa6bd2d56d776c3767a0876f Mon Sep 17 00:00:00 2001 From: Dltmd202 Date: Sun, 27 Oct 2024 14:51:35 +0900 Subject: [PATCH] Lower the replication factor for transactions topic on EmbeddedKafka --- .../kafka/test/context/EmbeddedKafkaContextCustomizer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-kafka-test/src/main/java/org/springframework/kafka/test/context/EmbeddedKafkaContextCustomizer.java b/spring-kafka-test/src/main/java/org/springframework/kafka/test/context/EmbeddedKafkaContextCustomizer.java index e8ec424dc2..9b94546506 100644 --- a/spring-kafka-test/src/main/java/org/springframework/kafka/test/context/EmbeddedKafkaContextCustomizer.java +++ b/spring-kafka-test/src/main/java/org/springframework/kafka/test/context/EmbeddedKafkaContextCustomizer.java @@ -47,7 +47,7 @@ * @author Oleg Artyomov * @author Sergio Lourenco * @author Pawel Lozinski - * @author Dltmd202 + * @author Seonghwan Lee * @since 1.3 */ class EmbeddedKafkaContextCustomizer implements ContextCustomizer { @@ -122,7 +122,7 @@ public void customizeContext(ConfigurableApplicationContext context, MergedConte } } - properties.putIfAbsent(TRANSACTION_STATE_LOG_REPLICATION_FACTOR, String.valueOf(Math.min(3, embeddedKafka.value()))); + properties.putIfAbsent(TRANSACTION_STATE_LOG_REPLICATION_FACTOR, String.valueOf(Math.min(3, embeddedKafka.count()))); embeddedKafkaBroker.brokerProperties((Map) (Map) properties); if (StringUtils.hasText(this.embeddedKafka.bootstrapServersProperty())) {