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