提交 e4fa538d authored 作者: Thomas Mueller's avatar Thomas Mueller

Tests

上级 2304e46a
...@@ -234,8 +234,10 @@ java org.h2.test.TestAll timer ...@@ -234,8 +234,10 @@ java org.h2.test.TestAll timer
*/ */
; /**
private static final boolean MV_STORE = true; * Whether the MVStore storage is used.
*/
public final boolean mvStore = Constants.VERSION_MINOR >= 4;
/** /**
* If the test should run with many rows. * If the test should run with many rows.
...@@ -252,11 +254,6 @@ java org.h2.test.TestAll timer ...@@ -252,11 +254,6 @@ java org.h2.test.TestAll timer
*/ */
public boolean memory; public boolean memory;
/**
* Whether to use the MVStore.
*/
public boolean mvStore;
/** /**
* Whether the test is running with code coverage. * Whether the test is running with code coverage.
*/ */
...@@ -270,7 +267,7 @@ java org.h2.test.TestAll timer ...@@ -270,7 +267,7 @@ java org.h2.test.TestAll timer
/** /**
* If the multi version concurrency control mode should be used. * If the multi version concurrency control mode should be used.
*/ */
public boolean mvcc; public boolean mvcc = mvStore;
/** /**
* The cipher to use (null for unencrypted). * The cipher to use (null for unencrypted).
...@@ -434,7 +431,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -434,7 +431,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
test.reopen = true; test.reopen = true;
TestReopen reopen = new TestReopen(); TestReopen reopen = new TestReopen();
reopen.init(); reopen.init();
reopen.config.mvStore = MV_STORE;
FilePathRec.setRecorder(reopen); FilePathRec.setRecorder(reopen);
test.runTests(); test.runTests();
} else if ("crash".equals(args[0])) { } else if ("crash".equals(args[0])) {
...@@ -470,29 +466,15 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -470,29 +466,15 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
prof.depth = 16; prof.depth = 16;
prof.interval = 1; prof.interval = 1;
prof.startCollecting(); prof.startCollecting();
if (test.mvStore) {
TestPerformance.main("-init", "-db", "9", "-size", "1000"); TestPerformance.main("-init", "-db", "9", "-size", "1000");
} else {
TestPerformance.main("-init", "-db", "1");
}
prof.stopCollecting(); prof.stopCollecting();
System.out.println(prof.getTop(30)); System.out.println(prof.getTop(30));
if (test.mvStore) {
prof = new Profiler();
prof.depth = 16;
prof.interval = 1;
prof.startCollecting();
TestPerformance.main("-init", "-db", "1", "-size", "1000"); TestPerformance.main("-init", "-db", "1", "-size", "1000");
prof.stopCollecting(); prof.stopCollecting();
System.out.println(prof.getTop(3)); System.out.println(prof.getTop(3));
TestPerformance.main("-init", "-db", "1", "-size", "1000"); TestPerformance.main("-init", "-db", "1", "-size", "1000");
TestPerformance.main("-init", "-db", "9", "-size", "1000"); TestPerformance.main("-init", "-db", "9", "-size", "1000");
} }
// Recover.execute("data", null);
// RunScript.execute("jdbc:h2:data/test2",
// "sa1", "sa1", "data/test.h2.sql", null, false);
// Recover.execute("data", null);
}
System.out.println(TestBase.formatTime( System.out.println(TestBase.formatTime(
System.currentTimeMillis() - time) + " total"); System.currentTimeMillis() - time) + " total");
} }
...@@ -529,11 +511,10 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -529,11 +511,10 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
coverage = isCoverage(); coverage = isCoverage();
mvStore = MV_STORE;
smallLog = big = networked = memory = ssl = false; smallLog = big = networked = memory = ssl = false;
diskResult = traceSystemOut = diskUndo = false; diskResult = traceSystemOut = diskUndo = false;
mvcc = traceTest = stopOnError = false; mvcc = mvStore;
traceTest = stopOnError = false;
defrag = false; defrag = false;
traceLevelFile = throttle = 0; traceLevelFile = throttle = 0;
cipher = null; cipher = null;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论