Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#8486] Improvement(core): Correct the LocalJobExecutor test teardown to run after each test (#8490)

Xiaojian Sund9d577d3309c
diff --git a/core/src/test/java/org/apache/gravitino/job/local/TestLocalJobExecutor.java b/core/src/test/java/org/apache/gravitino/job/local/TestLocalJobExecutor.java
index fae19ad422..6c2dab5ad1 100644
--- a/core/src/test/java/org/apache/gravitino/job/local/TestLocalJobExecutor.java
+++ b/core/src/test/java/org/apache/gravitino/job/local/TestLocalJobExecutor.java
@@ -35,6 +35,7 @@ import org.apache.gravitino.meta.AuditInfo;
import org.apache.gravitino.meta.JobTemplateEntity;
import org.apache.gravitino.utils.NamespaceUtil;
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.BeforeEach;
@@ -96,7 +97,7 @@ public class TestLocalJobExecutor {
workingDir = Files.createTempDirectory("gravitino-test-local-job-executor").toFile();
}
- @BeforeEach
+ @AfterEach
public void tearDown() throws IOException {
if (workingDir != null && workingDir.exists()) {
FileUtils.deleteDirectory(workingDir);