updated how initial test data is updated

Former-commit-id: 46752322063b694c89226b0f9b658aa97e0d396f
This commit is contained in:
Jeremy Long
2013-08-24 20:00:09 -04:00
parent 39df3cf211
commit b1c21f875f

View File

@@ -56,11 +56,12 @@ public abstract class BaseDBTestCase extends TestCase {
String indexPath = getDataDirectory().getCanonicalPath();
java.io.File f = new File(indexPath);
if (!f.exists() || (f.isDirectory() && f.listFiles().length == 0)) {
f = f.getParentFile();
f.mkdirs();
FileInputStream fis = null;
ZipInputStream zin = null;
try {
File path = new File(BaseDBTestCase.class.getClassLoader().getResource("db.cve.zip").getPath());
File path = new File(BaseDBTestCase.class.getClassLoader().getResource("data.zip").getPath());
fis = new FileInputStream(path);
zin = new ZipInputStream(new BufferedInputStream(fis));
ZipEntry entry;