mirror of
https://github.com/wahyd4/spring-cloud-stream-samples.git
synced 2026-08-08 21:06:34 +10:00
Add @DirtiesContext to the inventory test
This commit is contained in:
+2
@@ -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";
|
||||
|
||||
+2
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user