mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 22:58:32 +01:00
Use temp dir under target/ for derby test, ensure we actually do delete the directory afterwards.
Resolves issue 129.
This commit is contained in:
parent
6f8ab7b40b
commit
d5aad396a3
1 changed files with 14 additions and 4 deletions
|
@ -15,24 +15,34 @@
|
|||
*/
|
||||
package com.google.bitcoin.store;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import com.google.bitcoin.core.Address;
|
||||
import com.google.bitcoin.core.ECKey;
|
||||
import com.google.bitcoin.core.NetworkParameters;
|
||||
import com.google.bitcoin.core.StoredBlock;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class DerbyBlockStoreTest {
|
||||
/**
|
||||
* This path will be deleted recursively!
|
||||
*/
|
||||
private static final String DB_NAME = ".bitcoinj.unittest.derby";
|
||||
private static final String DB_NAME = "target/bitcoinj.unittest.derby";
|
||||
|
||||
@After
|
||||
public void clear() {
|
||||
try {
|
||||
deleteRecursively(new File(DB_NAME));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
// Does not really matter.
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStorage() throws Exception {
|
||||
|
|
Loading…
Add table
Reference in a new issue