Merge pull request #839 from jeremylong/h2upgrade

H2 Upgrade
This commit is contained in:
Jeremy Long
2017-08-20 11:02:17 -04:00
committed by GitHub
13 changed files with 247 additions and 87 deletions

View File

@@ -70,9 +70,10 @@ public abstract class BaseDBTestCase extends BaseTest {
d.mkdir();
continue;
}
File o = new File(dataPath, entry.getName());
o.createNewFile();
try (FileOutputStream fos = new FileOutputStream(o, false);
//File o = new File(dataPath, entry.getName());
//o.createNewFile();
dataFile.createNewFile();
try (FileOutputStream fos = new FileOutputStream(dataFile, false);
BufferedOutputStream dest = new BufferedOutputStream(fos, BUFFER_SIZE)) {
IOUtils.copy(zin, dest);
} catch (Throwable ex) {

View File

@@ -116,6 +116,11 @@ public class EngineModeIT extends BaseTest {
assertThat(Files.exists(directory), is(true));
assertThat(Files.isDirectory(directory), is(true));
Path database = directory.resolve(Settings.getString(Settings.KEYS.DB_FILE_NAME));
System.err.println(database.toString());
for (String f : directory.toFile().list()) {
System.err.println(f);
}
assertThat(Files.exists(database), is(exists));
}
}

View File

@@ -18,7 +18,7 @@ data.directory=[JAR]/data
#if the filename has a %s it will be replaced with the current expected version
data.file_name=dc.h2.db
data.version=3.0
data.connection_string=jdbc:h2:file:%s;FILE_LOCK=SERIALIZED;AUTOCOMMIT=ON;
data.connection_string=jdbc:h2:file:%s;MV_STORE=FALSE;AUTOCOMMIT=ON;LOCK_MODE=0;FILE_LOCK=NO
#data.connection_string=jdbc:mysql://localhost:3306/dependencycheck
# user name and password for the database connection. The inherent case is to use H2.