Skip to content

Commit

Permalink
camel-kafka - Properly define the after all method
Browse files Browse the repository at this point in the history
  • Loading branch information
essobedo committed Jun 16, 2023
1 parent f495064 commit 6151621
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
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;
Expand Down Expand Up @@ -128,7 +129,7 @@ public static void before() {
}

@AfterAll
public void after() {
public static void after() {
// clean all test topics
final List<String> topics = new ArrayList<>();
topics.add(TOPIC_BYTES);
Expand All @@ -137,6 +138,10 @@ public void after() {
topics.add(TOPIC_STRINGS);

kafkaAdminClient.deleteTopics(topics);
}

@AfterEach
public void reset() {
mockEndpoint.reset();
}

Expand Down

0 comments on commit 6151621

Please sign in to comment.