Skip to content

Commit ae65745

Browse files
committed
scope tmpDir to per test
1 parent bea66bc commit ae65745

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

photon-core/src/test/java/org/photonvision/common/configuration/SQLConfigTest.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
import com.fasterxml.jackson.core.JsonProcessingException;
2424
import edu.wpi.first.cscore.UsbCameraInfo;
2525
import java.io.IOException;
26-
import java.nio.file.Files;
2726
import java.nio.file.Path;
2827
import java.util.Collection;
2928
import java.util.List;
3029
import org.apache.commons.io.FileUtils;
3130
import org.junit.jupiter.api.BeforeAll;
32-
import org.junit.jupiter.api.BeforeEach;
3331
import org.junit.jupiter.api.Order;
3432
import org.junit.jupiter.api.Test;
3533
import org.junit.jupiter.api.io.TempDir;
@@ -47,22 +45,13 @@
4745
import org.photonvision.vision.pipeline.ReflectivePipelineSettings;
4846

4947
public class SQLConfigTest {
50-
@TempDir private static Path tmpDir;
48+
@TempDir private Path tmpDir;
5149

5250
@BeforeAll
5351
public static void init() {
5452
LoadJNI.loadLibraries();
5553
}
5654

57-
@BeforeEach
58-
public void setup() throws IOException {
59-
// Ensure temp dir is empty
60-
Files.walk(tmpDir)
61-
.filter(path -> !path.equals(tmpDir))
62-
.map(Path::toFile)
63-
.forEach(file -> file.delete());
64-
}
65-
6655
@Test
6756
@Order(1)
6857
public void testMigration() {

0 commit comments

Comments
 (0)