Skip to content

Commit

Permalink
Add block store deletion / windows hack unit test
Browse files Browse the repository at this point in the history
Cherry pick 6ddeb70
  • Loading branch information
oscarguindzberg committed May 16, 2020
1 parent 5439721 commit 66ad127
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/test/java/org/bitcoinj/store/SPVBlockStoreTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,13 @@ public void performanceTest() throws BlockStoreException {
watch.elapsed(TimeUnit.MILLISECONDS) < THRESHOLD_MS);
store.close();
}

@Test
public void oneStoreDelete() throws Exception {
// Used to fail on windows
// See https://github.com/bitcoinj/bitcoinj/issues/1477#issuecomment-450274821
SPVBlockStore store = new SPVBlockStore(UNITTEST, blockStoreFile);
store.close();
assertTrue(blockStoreFile.delete());
}
}

0 comments on commit 66ad127

Please sign in to comment.