Skip to content

Commit

Permalink
Fixes flaky integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenchickenlove committed Oct 7, 2024
1 parent 9ce3d04 commit fd3e4ff
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ static class TestTopicListener0 {
containerFactory = MAIN_TOPIC_CONTAINER_FACTORY0,
batch = "true")
public void listen(List<ConsumerRecord<?, ?>> records) {
latch0.countDown();
for (ConsumerRecord<?, ?> record : records) {
Iterable<Header> headers = record.headers().headers(KafkaHeaders.DELIVERY_ATTEMPT);
for (Header header : headers) {
receivedHeaders.add(header);
}
}
latch0.countDown();
throw new RuntimeException("Failed.");
}
}
Expand All @@ -176,13 +176,13 @@ static class TestTopicListener1 {
containerFactory = MAIN_TOPIC_CONTAINER_FACTORY1,
batch = "true")
public void listen(List<ConsumerRecord<?, ?>> records) {
latch1.countDown();
for (ConsumerRecord<?, ?> record : records) {
Iterable<Header> headers = record.headers().headers(KafkaHeaders.DELIVERY_ATTEMPT);
for (Header header : headers) {
receivedHeaders.add(header);
}
}
latch1.countDown();
throw new RuntimeException("Failed.");
}
}
Expand Down

0 comments on commit fd3e4ff

Please sign in to comment.