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;
@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)