Closed ctrueden closed 1 year ago
@ctrueden seems we were a little late to getting this fixed, sorry for that. In the new N5 version (and all the related n5 dependencies that had this issue) this should be resolved already in n5 3.0.0+. We did a similar thing to what you recently show in your PRs. Please reopen this if you still are running into this issue with the newest n5 releases.
@cmhulbert Haha, I totally forgot I had written up this issue when I filed all the N5 PRs attempting to fix it. I was just independently re-annoyed by the existence of ~/tmp
filled with n5 test vestiges, and decided to look into what it would take to address it. Thanks for working on it, much appreciated.
The tests need a temp directory for testing read/write behaviors. In N5FSTest, the
testDirPath
is set to ~/tmp/n5-test. But this clutters up the user's home directory, especially since this directory is not deleted after testing is complete. Better would be to useFiles.createTempDirectory
to create the directory in the dedicated temp file space, andFile.deleteOnExit
to remove it cleanly when the JVM shuts down.This is also an issue with the various n5 extensions: