diff --git a/spring-kafka/src/test/java/org/springframework/kafka/listener/DeliveryAttemptAwareRetryListenerIntegrationTest.java b/spring-kafka/src/test/java/org/springframework/kafka/listener/DeliveryAttemptAwareRetryListenerIntegrationTest.java index 8b1268c71f..c9712478d3 100644 --- a/spring-kafka/src/test/java/org/springframework/kafka/listener/DeliveryAttemptAwareRetryListenerIntegrationTest.java +++ b/spring-kafka/src/test/java/org/springframework/kafka/listener/DeliveryAttemptAwareRetryListenerIntegrationTest.java @@ -157,13 +157,13 @@ static class TestTopicListener0 { containerFactory = MAIN_TOPIC_CONTAINER_FACTORY0, batch = "true") public void listen(List> records) { - latch0.countDown(); for (ConsumerRecord record : records) { Iterable
headers = record.headers().headers(KafkaHeaders.DELIVERY_ATTEMPT); for (Header header : headers) { receivedHeaders.add(header); } } + latch0.countDown(); throw new RuntimeException("Failed."); } } @@ -176,13 +176,13 @@ static class TestTopicListener1 { containerFactory = MAIN_TOPIC_CONTAINER_FACTORY1, batch = "true") public void listen(List> records) { - latch1.countDown(); for (ConsumerRecord record : records) { Iterable
headers = record.headers().headers(KafkaHeaders.DELIVERY_ATTEMPT); for (Header header : headers) { receivedHeaders.add(header); } } + latch1.countDown(); throw new RuntimeException("Failed."); } }