From: Kai Moritz Date: Fri, 15 Sep 2023 10:59:25 +0000 (+0200) Subject: VORTASTEN X-Git-Tag: rebase--2023-09-15--16-33~8 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=28c2091c9b4c6f819b26a879584e39406887046c;p=demos%2Fkafka%2Fchat VORTASTEN --- diff --git a/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java b/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java index a00f2c1f..4fc7aa10 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java +++ b/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java @@ -10,6 +10,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.kafka.core.KafkaTemplate; import org.springframework.kafka.support.SendResult; +import org.springframework.test.context.TestPropertySource; import java.time.Clock; import java.util.List; @@ -24,7 +25,14 @@ public class KafkaTestUtils @TestConfiguration @EnableConfigurationProperties(ChatBackendProperties.class) @Import(KafkaServicesConfiguration.class) - static class KafkaTestConfiguration + @TestPropertySource(properties = { + "spring.main.allow-bean-definition-overriding=true", + "chat.backend.services=kafka", + "chat.backend.kafka.client-id-PREFIX=TEST", + "chat.backend.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}", + "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}", + }) + public static class KafkaTestConfiguration { @Bean WorkAssignor dataChannelWorkAssignor(DataChannel dataChannel)