properties = {
"consumer.bootstrap-server=${spring.embedded.kafka.brokers}",
"consumer.topic=" + TOPIC,
- "consumer.commit-interval=100ms" })
+ "consumer.commit-interval=1s" })
@EmbeddedKafka(topics = TOPIC, partitions = PARTITIONS)
@Slf4j
class ApplicationTests
await("100 records received")
.atMost(Duration.ofSeconds(30))
+ .pollInterval(Duration.ofSeconds(1))
.until(() -> receivedRecords.size() >= 100);
await("Offsets committed")
.atMost(Duration.ofSeconds(10))
+ .pollInterval(Duration.ofSeconds(1))
.untilAsserted(() ->
{
checkSeenOffsetsForProgress();
await("Consumer failed")
.atMost(Duration.ofSeconds(30))
+ .pollInterval(Duration.ofSeconds(1))
.until(() -> !endlessConsumer.running());
checkSeenOffsetsForProgress();
endlessConsumer.start();
await("Consumer failed")
.atMost(Duration.ofSeconds(30))
+ .pollInterval(Duration.ofSeconds(1))
.until(() -> !endlessConsumer.running());
checkSeenOffsetsForProgress();