import de.juplo.kafka.chat.backend.domain.exceptions.LoadInProgressException;
import de.juplo.kafka.chat.backend.domain.exceptions.UnknownChatroomException;
import de.juplo.kafka.chat.backend.implementation.inmemory.InMemoryServicesConfiguration;
+import de.juplo.kafka.chat.backend.implementation.kafka.KafkaServicesConfiguration;
import de.juplo.kafka.chat.backend.storage.files.FilesStorageConfiguration;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
@SpringJUnitConfig(classes = {
InMemoryServicesConfiguration.class,
FilesStorageConfiguration.class,
+ KafkaServicesConfiguration.class,
ChatHomeServiceTest.TestConfiguration.class })
@EnableConfigurationProperties(ChatBackendProperties.class)
public abstract class ChatHomeServiceTest
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.TopicPartition;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.boot.test.context.TestConfiguration;
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 reactor.core.publisher.Mono;
-import java.time.Clock;
import java.util.List;
@Slf4j
-public class KafkaTestUtils
+public abstract class KafkaTestUtils
{
- @TestConfiguration
- @EnableConfigurationProperties(ChatBackendProperties.class)
- @Import(KafkaServicesConfiguration.class)
public static class KafkaTestConfiguration
{
@Bean
dataChannel.onPartitionsAssigned(assignedPartitions);
};
}
-
- @Bean
- public Clock clock()
- {
- return Clock.systemDefaultZone();
- }
}