Skip to content

Commit

Permalink
do not rely on TmpDir for cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrinot committed Oct 12, 2023
1 parent 5d22100 commit 5a096b4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 5a096b4

Please sign in to comment.