public void testWrite2StoreVsCleanUp() throws Exception { LocalHistoryTestStore store = createStore(); long ts = System.currentTimeMillis(); File file = new File(dataDir, "crapfile"); File storefile = store.getStoreFile(file, ts, true); assertTrue(storefile.getParentFile().exists()); assertFalse(storefile.exists()); store.cleanUp(ts); // shouldn't remove the storefiles parent even if it's still empty assertTrue(storefile.getParentFile().exists()); OutputStream os1 = StoreEntry.createStoreFileOutputStream(storefile); }