You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2021/02/15 10:39:10 UTC
[camel-kafka-connector] 09/10: Delete the connector before deleting
the test topics
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch camel-master
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git
commit 2b0bda21a0d39e124aed346c8843fc402707a7e9
Author: Otavio Rodolfo Piske <op...@redhat.com>
AuthorDate: Mon Feb 15 10:49:49 2021 +0100
Delete the connector before deleting the test topics
---
.../common/services/kafkaconnect/KafkaConnectEmbedded.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/kafkaconnect/KafkaConnectEmbedded.java b/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/kafkaconnect/KafkaConnectEmbedded.java
index 52af0a5..9d3d833 100644
--- a/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/kafkaconnect/KafkaConnectEmbedded.java
+++ b/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/kafkaconnect/KafkaConnectEmbedded.java
@@ -88,13 +88,13 @@ public class KafkaConnectEmbedded implements KafkaConnectService {
public void stop() {
if (connectorName != null) {
try {
+ LOG.info("Removing connector {}", connectorName);
+ cluster.deleteConnector(connectorName);
+
LOG.info("Removing topics used during the test");
Admin client = cluster.kafka().createAdminClient();
client.deleteTopics(cluster.connectorTopics(connectorName).topics());
-
- LOG.info("Removing connector {}", connectorName);
- cluster.deleteConnector(connectorName);
} finally {
connectorName = null;
}