Add @DirtiesContext to the inventory test

This commit is contained in:
Soby Chacko
2019-11-08 14:55:26 -05:00
parent 0b95dc0533
commit f29ce89a27
2 changed files with 4 additions and 0 deletions
@@ -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";
@@ -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";