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)
- @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 KafkaTestConfiguration
{
@Bean