mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 00:29:21 +01:00
fixed base test case to ensure data exists for other tests
Former-commit-id: b728204c02eb46fa4c15490024b64584e64f9920
This commit is contained in:
@@ -50,7 +50,7 @@ public abstract class BaseDBTestCase extends TestCase {
|
|||||||
public static void ensureDBExists() throws Exception {
|
public static void ensureDBExists() throws Exception {
|
||||||
|
|
||||||
java.io.File dataPath = Settings.getFile(Settings.KEYS.DATA_DIRECTORY);
|
java.io.File dataPath = Settings.getFile(Settings.KEYS.DATA_DIRECTORY);
|
||||||
if (!dataPath.exists() || (dataPath.isDirectory() && dataPath.listFiles().length == 0)) {
|
if (!dataPath.exists() || (dataPath.isDirectory() && dataPath.listFiles().length < 3)) {
|
||||||
dataPath.mkdirs();
|
dataPath.mkdirs();
|
||||||
FileInputStream fis = null;
|
FileInputStream fis = null;
|
||||||
ZipInputStream zin = null;
|
ZipInputStream zin = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user