<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.springframework.kafka</groupId>
+ <artifactId>spring-kafka-test</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
private int numPartitions = 2;
}
- public enum ServiceType { inmemory }
+ public enum ServiceType { inmemory, kafka }
public enum StorageStrategyType { files, mongodb }
public enum ShardingStrategyType { none, kafkalike }
}
--- /dev/null
+package de.juplo.kafka.chat.backend;
+
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.kafka.test.context.EmbeddedKafka;
+
+import static de.juplo.kafka.chat.backend.KafkaConfigurationIT.TOPIC;
+
+
+@SpringBootTest(
+ webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
+ properties = {
+ "chat.backend.services=kafka",
+ "chat.backend.kafka.client-id=TEST",
+ "chat.backend.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}",
+ "chat.backend.kafka.topic=" + TOPIC,
+ "chat.backend.kafka.num-partitions=3" })
+@EmbeddedKafka(topics = TOPIC, partitions = 3)
+class KafkaConfigurationIT extends AbstractConfigurationIT
+{
+ final static String TOPIC = "TEST";
+}