Remember to lock the lock, thus fixing tests
@@ -53,6 +53,7 @@ public static TemporaryFilesystem getDefaultTmpFS() {
public static void setTemporaryDirectory(File directory) {
Lock writeLock = lock.writeLock();
+ writeLock.lock();
try {
instance = new TemporaryFilesystem(directory);
} finally {
