This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 4ca46d5ceae6 Improve assertion in case of test failure for Kafka when
creating a topic
4ca46d5ceae6 is described below
commit 4ca46d5ceae626df0f3e4c908faebd4b80f8dc23
Author: Aurélien Pupier <[email protected]>
AuthorDate: Fri Feb 27 10:18:13 2026 +0100
Improve assertion in case of test failure for Kafka when creating a
topic
A lot of tests are failing on Ci only with this kind of error:
```
org.opentest4j.AssertionFailedError
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:42)
at org.junit.jupiter.api.Assertions.fail(Assertions.java:143)
at
org.apache.camel.component.kafka.integration.common.KafkaTestUtil.createTopic(KafkaTestUtil.java:105)
at
org.apache.camel.processor.idempotent.kafka.KafkaIdempotentRepositoryEagerIT.createRepositoryTopic(KafkaIdempotentRepositoryEagerIT.java:41)
```
now, we should have access to the stacktrace. it can help as the
exception message seems to be empty
Signed-off-by: Aurélien Pupier <[email protected]>
---
.../apache/camel/component/kafka/integration/common/KafkaTestUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/common/KafkaTestUtil.java
b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/common/KafkaTestUtil.java
index d173d8d0c492..f8c33c2d07b6 100644
---
a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/common/KafkaTestUtil.java
+++
b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/common/KafkaTestUtil.java
@@ -102,7 +102,7 @@ public final class KafkaTestUtil {
List<TopicPartitionInfo> pi = td.partitions();
assertEquals(numPartitions, pi.size());
} catch (Exception e) {
- fail(e.getMessage());
+ fail("Exception while creating Kafka topic", e);
}
}
}