This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch fix-tests in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 6151621ca2933d6e07c4df97af4fceffdd0ee2bd Author: Nicolas Filotto <[email protected]> AuthorDate: Fri Jun 16 19:47:11 2023 +0200 camel-kafka - Properly define the after all method --- .../camel/component/kafka/integration/KafkaProducerFullIT.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components-starter/camel-kafka-starter/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerFullIT.java b/components-starter/camel-kafka-starter/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerFullIT.java index 43803d9a723..04a884de53e 100644 --- a/components-starter/camel-kafka-starter/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerFullIT.java +++ b/components-starter/camel-kafka-starter/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerFullIT.java @@ -47,6 +47,7 @@ import org.apache.kafka.clients.producer.RecordMetadata; import org.apache.kafka.common.header.Header; import org.apache.kafka.common.header.Headers; import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -128,7 +129,7 @@ public class KafkaProducerFullIT extends BaseEmbeddedKafkaTestSupport { } @AfterAll - public void after() { + public static void after() { // clean all test topics final List<String> topics = new ArrayList<>(); topics.add(TOPIC_BYTES); @@ -137,6 +138,10 @@ public class KafkaProducerFullIT extends BaseEmbeddedKafkaTestSupport { topics.add(TOPIC_STRINGS); kafkaAdminClient.deleteTopics(topics); + } + + @AfterEach + public void reset() { mockEndpoint.reset(); }
