Skip to content

Commit

Permalink
See #266
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-asprino committed Sep 21, 2022
1 parent b467a55 commit be26802
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Iterator;
import java.util.Properties;

Expand Down Expand Up @@ -134,7 +136,7 @@ public void testWithOnDiskGraph1 () throws IOException, TriplifierHTTPException
Properties properties = new Properties();
properties.setProperty("namespace", "http://www.example.org#");
// properties.setProperty("ondisk", "/tmp");
File tmp = new File(getClass().getClassLoader().getResource(".").getPath(), "testOndiskGraph1");
File tmp = Files.createTempDirectory(null).toFile();
tmp.mkdirs();
properties.setProperty("ondisk", tmp.getAbsolutePath());
URL csv1 = getClass().getClassLoader().getResource("./test3.csv");
Expand All @@ -159,15 +161,15 @@ public void testWithOnDiskGraph1 () throws IOException, TriplifierHTTPException
fail("expected 21 quads but found " + count);
}
graph.end();
FileUtils.deleteDirectory(tmp);
FileUtils.deleteQuietly(tmp);
}

@Test
public void testWithOnDiskGraph2 () throws IOException, TriplifierHTTPException {
Properties properties = new Properties();
properties.setProperty("namespace", "http://www.example.org#");
//properties.setProperty("ondisk", "/tmp");
File tmp = new File(getClass().getClassLoader().getResource(".").getPath(), "testWithOnDiskGraph2");
File tmp = Files.createTempDirectory(null).toFile();
tmp.mkdirs();
properties.setProperty("ondisk", tmp.getAbsolutePath());
URL csv1 = getClass().getClassLoader().getResource("./test1.csv");
Expand All @@ -190,6 +192,6 @@ public void testWithOnDiskGraph2 () throws IOException, TriplifierHTTPException
fail("expected 13 quads but found " + count);
}
graph.end();
FileUtils.deleteDirectory(tmp);
FileUtils.deleteQuietly(tmp);
}
}

0 comments on commit be26802

Please sign in to comment.