提交 86b35c0b authored 作者: christian.peter.io's avatar christian.peter.io

Checkstyle and test page store, too

上级 6cc6df0c
...@@ -496,17 +496,26 @@ public class TestFileLockSerialized extends TestBase { ...@@ -496,17 +496,26 @@ public class TestFileLockSerialized extends TestBase {
deleteDb("fileLockSerialized"); deleteDb("fileLockSerialized");
// without serialized // without serialized
String url = "jdbc:h2:" + baseDir + "/fileLockSerialized;PAGE_STORE=FALSE"; String url;
if (config.pageStore) {
url = "jdbc:h2:" + baseDir + "/fileLockSerialized;PAGE_STORE=TRUE";
} else {
url = "jdbc:h2:" + baseDir + "/fileLockSerialized;PAGE_STORE=FALSE";
}
Connection conn = DriverManager.getConnection(url); Connection conn = DriverManager.getConnection(url);
Statement stat = conn.createStatement(); Statement stat = conn.createStatement();
stat.execute("create table test(id int)"); stat.execute("create table test(id int)");
stat.execute("insert into test values(0)"); stat.execute("insert into test values(0)");
conn.close(); conn.close();
List filesWithoutSerialized = Arrays.asList(new File(baseDir).list()); List<String> filesWithoutSerialized = Arrays.asList(new File(baseDir).list());
deleteDb("fileLockSerialized"); deleteDb("fileLockSerialized");
// with serialized // with serialized
if (config.pageStore) {
url = "jdbc:h2:" + baseDir + "/fileLockSerialized;FILE_LOCK=SERIALIZED;PAGE_STORE=TRUE";
} else {
url = "jdbc:h2:" + baseDir + "/fileLockSerialized;FILE_LOCK=SERIALIZED;PAGE_STORE=FALSE"; url = "jdbc:h2:" + baseDir + "/fileLockSerialized;FILE_LOCK=SERIALIZED;PAGE_STORE=FALSE";
}
conn = DriverManager.getConnection(url); conn = DriverManager.getConnection(url);
stat = conn.createStatement(); stat = conn.createStatement();
stat.execute("create table test(id int)"); stat.execute("create table test(id int)");
...@@ -514,7 +523,7 @@ public class TestFileLockSerialized extends TestBase { ...@@ -514,7 +523,7 @@ public class TestFileLockSerialized extends TestBase {
stat.execute("insert into test values(0)"); stat.execute("insert into test values(0)");
conn.close(); conn.close();
List filesWithSerialized = Arrays.asList(new File(baseDir).list()); List<String> filesWithSerialized = Arrays.asList(new File(baseDir).list());
if (filesWithoutSerialized.size() != filesWithSerialized.size()) { if (filesWithoutSerialized.size() != filesWithSerialized.size()) {
for (int i = 0; i < filesWithoutSerialized.size(); i++) { for (int i = 0; i < filesWithoutSerialized.size(); i++) {
if (!filesWithSerialized.contains(filesWithoutSerialized.get(i))) { if (!filesWithSerialized.contains(filesWithoutSerialized.get(i))) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论