Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
buckelieg committed Jul 15, 2024
1 parent 566d567 commit 9e6fc97
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions src/test/java/buckelieg/jdbc/DBTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,25 @@ public class DBTests {

@BeforeAll
public static void init() throws Exception {
Files.walkFileTree(Paths.get("test"), new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {
Files.delete(path);
return FileVisitResult.CONTINUE;
}
Path test = Paths.get("test");
if (test.toFile().exists()) {
Files.walkFileTree(test, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {
Files.delete(path);
return FileVisitResult.CONTINUE;
}

@Override
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
if (exc != null) {
throw exc;
@Override
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
if (exc != null) {
throw exc;
}
Files.delete(dir);
return FileVisitResult.CONTINUE;
}
Files.delete(dir);
return FileVisitResult.CONTINUE;
}
});
});
}
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
conn = DriverManager.getConnection("jdbc:derby:memory:test;create=true");
EmbeddedDataSource ds = new EmbeddedDataSource();
Expand Down

0 comments on commit 9e6fc97

Please sign in to comment.