WHATTHEFUCK
authorKai Moritz <kai@juplo.de>
Fri, 15 Sep 2023 10:55:14 +0000 (12:55 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 15 Sep 2023 11:17:29 +0000 (13:17 +0200)
src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaChatHomeServiceTest.java

index 3390da3..25ea676 100644 (file)
@@ -16,7 +16,6 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Import;
 import org.springframework.kafka.core.KafkaTemplate;
 import org.springframework.kafka.test.context.EmbeddedKafka;
-import org.springframework.test.context.TestPropertySource;
 
 import java.time.Clock;
 import java.util.List;
@@ -33,6 +32,11 @@ import static de.juplo.kafka.chat.backend.implementation.kafka.KafkaChatHomeServ
         TaskExecutionAutoConfiguration.class,
     },
     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}",
         "chat.backend.kafka.info-channel-topic=" + INFO_TOPIC,
         "chat.backend.kafka.data-channel-topic=" + DATA_TOPIC,
         "chat.backend.kafka.num-partitions=" + NUM_SHARDS,
@@ -50,13 +54,6 @@ public class KafkaChatHomeServiceTest extends ChatHomeServiceWithShardsTest
   @TestConfiguration
   @EnableConfigurationProperties(ChatBackendProperties.class)
   @Import(KafkaServicesConfiguration.class)
-  @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}",
-  })
   static class KafkaChatHomeTestConfiguration
   {
     @Bean