diff --git a/kafka-streams-samples/kafka-streams-inventory-count/src/test/java/kafka/streams/inventory/count/KafkaStreamsInventoryCountTests.java b/kafka-streams-samples/kafka-streams-inventory-count/src/test/java/kafka/streams/inventory/count/KafkaStreamsInventoryCountTests.java index 377fa52..9112578 100644 --- a/kafka-streams-samples/kafka-streams-inventory-count/src/test/java/kafka/streams/inventory/count/KafkaStreamsInventoryCountTests.java +++ b/kafka-streams-samples/kafka-streams-inventory-count/src/test/java/kafka/streams/inventory/count/KafkaStreamsInventoryCountTests.java @@ -32,6 +32,7 @@ import org.springframework.kafka.support.serializer.JsonSerializer; import org.springframework.kafka.test.EmbeddedKafkaBroker; import org.springframework.kafka.test.context.EmbeddedKafka; import org.springframework.kafka.test.utils.KafkaTestUtils; +import org.springframework.test.annotation.DirtiesContext; /** * A test implementation that uses {@link SpringApplicationBuilder} directly, instead of '@SpringBootTest'. @@ -44,6 +45,7 @@ import org.springframework.kafka.test.utils.KafkaTestUtils; */ @EmbeddedKafka(topics = KafkaStreamsInventoryCountTests.INPUT_TOPIC, brokerProperties = {"replica.high.watermark.checkpoint.interval.ms=100000000"}) +@DirtiesContext public class KafkaStreamsInventoryCountTests extends AbstractInventoryCountTests{ static final String INPUT_TOPIC = "inventory-update-events"; diff --git a/kafka-streams-samples/kafka-streams-inventory-count/src/test/java/kafka/streams/inventory/count/SpringBootKafkaStreamsInventoryCountTests.java b/kafka-streams-samples/kafka-streams-inventory-count/src/test/java/kafka/streams/inventory/count/SpringBootKafkaStreamsInventoryCountTests.java index 733b0f1..3f5514e 100644 --- a/kafka-streams-samples/kafka-streams-inventory-count/src/test/java/kafka/streams/inventory/count/SpringBootKafkaStreamsInventoryCountTests.java +++ b/kafka-streams-samples/kafka-streams-inventory-count/src/test/java/kafka/streams/inventory/count/SpringBootKafkaStreamsInventoryCountTests.java @@ -31,6 +31,7 @@ import org.springframework.kafka.support.serializer.JsonSerializer; import org.springframework.kafka.test.EmbeddedKafkaBroker; import org.springframework.kafka.test.context.EmbeddedKafka; import org.springframework.kafka.test.utils.KafkaTestUtils; +import org.springframework.test.annotation.DirtiesContext; /** @@ -59,6 +60,7 @@ import org.springframework.kafka.test.utils.KafkaTestUtils; "spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000", "spring.cloud.stream.kafka.streams.binder.configuration.cache.max.bytes.buffering=0" }) +@DirtiesContext public class SpringBootKafkaStreamsInventoryCountTests extends AbstractInventoryCountTests { static final String INPUT_TOPIC = "inventory-update-events";