From 58eedc0218f92ce2440a7a2b13a97d9a12b2fd4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Mon, 20 May 2024 16:30:51 +0200 Subject: [PATCH] flaky test --- .../java/ai/langstream/kafka/runner/KafkaReaderWrapper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/langstream-kafka-runtime/src/main/java/ai/langstream/kafka/runner/KafkaReaderWrapper.java b/langstream-kafka-runtime/src/main/java/ai/langstream/kafka/runner/KafkaReaderWrapper.java index 1738845ad..1b2b81b44 100644 --- a/langstream-kafka-runtime/src/main/java/ai/langstream/kafka/runner/KafkaReaderWrapper.java +++ b/langstream-kafka-runtime/src/main/java/ai/langstream/kafka/runner/KafkaReaderWrapper.java @@ -107,7 +107,11 @@ private OffsetPerPartition parseOffset() throws IOException { @Override public void close() { if (consumer != null) { - consumer.close(); + try { + consumer.close(); + } catch (org.apache.kafka.common.errors.InterruptException e) { + log.warn("Interrupted while closing Kafka consumer", e); + } } }