From: Kai Moritz Date: Wed, 25 Sep 2024 20:34:29 +0000 (+0200) Subject: Racecondition in Test korrigiert X-Git-Tag: producer/spring-producer--Shutdown-Hängt~10 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=c1859ef2b4c2da556c337067f1e69b0950561a04;p=demos%2Fkafka%2Ftraining Racecondition in Test korrigiert --- diff --git a/src/test/java/de/juplo/kafka/ApplicationTests.java b/src/test/java/de/juplo/kafka/ApplicationTests.java index 646a335..50bc20b 100644 --- a/src/test/java/de/juplo/kafka/ApplicationTests.java +++ b/src/test/java/de/juplo/kafka/ApplicationTests.java @@ -27,6 +27,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. properties = { "spring.kafka.consumer.bootstrap-servers=${spring.embedded.kafka.brokers}", "producer.bootstrap-server=${spring.embedded.kafka.brokers}", + "spring.kafka.consumer.auto-offset-reset=earliest", "producer.topic=" + TOPIC}) @AutoConfigureMockMvc @EmbeddedKafka(topics = TOPIC, partitions = PARTITIONS)