From 5a096b4f87cbdad9dbbfed1448b4f9357bce7d79 Mon Sep 17 00:00:00 2001 From: Jaromir Hamala Date: Thu, 12 Oct 2023 15:50:22 +0200 Subject: [PATCH] do not rely on TmpDir for cleaning --- .../src/test/java/io/questdb/kafka/ExactlyOnceIT.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integration-tests/exactlyonce/src/test/java/io/questdb/kafka/ExactlyOnceIT.java b/integration-tests/exactlyonce/src/test/java/io/questdb/kafka/ExactlyOnceIT.java index 31679e6..458d85f 100644 --- a/integration-tests/exactlyonce/src/test/java/io/questdb/kafka/ExactlyOnceIT.java +++ b/integration-tests/exactlyonce/src/test/java/io/questdb/kafka/ExactlyOnceIT.java @@ -12,6 +12,7 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; +import org.junit.jupiter.api.io.CleanupMode; import org.junit.jupiter.api.io.TempDir; import org.slf4j.LoggerFactory; import org.testcontainers.containers.FixedHostPortGenericContainer; @@ -56,7 +57,7 @@ public class ExactlyOnceIT { private static final int KAFKA_CLUSTER_SIZE = 3; private static final int CONNECT_CLUSTER_SIZE = 2; - @TempDir + @TempDir(cleanup = CleanupMode.NEVER) static Path persistence; // we need to locate JARs with QuestDB client and Kafka Connect Connector, @@ -102,6 +103,8 @@ public static void stopContainer() { Stream.of(kafkas).forEach(KafkaContainer::stop); Stream.of(connects).forEach(GenericContainer::stop); zookeeper.stop(); + + io.questdb.std.Files.rmdir(io.questdb.std.str.Path.getThreadLocal(persistence.toAbsolutePath().toString())); } private static GenericContainer newZookeeperContainer() {