提交 9801430a authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Test utilities only once during TestAll

上级 69a4d7f3
...@@ -614,7 +614,12 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -614,7 +614,12 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
if (vmlens) { if (vmlens) {
return; return;
} }
testUnit(); testAdditional();
// test utilities
big = !travis;
testUtils();
big = false;
// lazy // lazy
lazy = true; lazy = true;
...@@ -627,20 +632,20 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -627,20 +632,20 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
memory = false; memory = false;
multiThreaded = true; multiThreaded = true;
test(); test();
testUnit(); testAdditional();
// a more normal setup // a more normal setup
memory = false; memory = false;
multiThreaded = false; multiThreaded = false;
test(); test();
testUnit(); testAdditional();
// basic pagestore testing // basic pagestore testing
memory = false; memory = false;
multiThreaded = false; multiThreaded = false;
mvStore = false; mvStore = false;
test(); test();
testUnit(); testAdditional();
mvStore = true; mvStore = true;
memory = true; memory = true;
...@@ -681,7 +686,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -681,7 +686,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
ssl = false; ssl = false;
traceLevelFile = 0; traceLevelFile = 0;
test(); test();
testUnit(); testAdditional();
big = false; big = false;
cipher = "AES"; cipher = "AES";
...@@ -702,7 +707,8 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -702,7 +707,8 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
memory = true; memory = true;
multiThreaded = true; multiThreaded = true;
test(); test();
testUnit(); testAdditional();
testUtils();
multiThreaded = false; multiThreaded = false;
mvStore = false; mvStore = false;
...@@ -876,7 +882,58 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -876,7 +882,58 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
afterTest(); afterTest();
} }
private void testUnit() { /**
* Run additional tests.
*/
private void testAdditional() {
if (networked) {
throw new RuntimeException("testAditional() is not allowed in networked mode");
}
addTest(new TestMVTableEngine());
addTest(new TestAutoReconnect());
addTest(new TestBnf());
addTest(new TestCache());
addTest(new TestCollation());
addTest(new TestCompress());
addTest(new TestConnectionInfo());
addTest(new TestExit());
addTest(new TestFileLock());
addTest(new TestJmx());
addTest(new TestModifyOnWrite());
addTest(new TestOldVersion());
addTest(new TestMultiThreadedKernel());
addTest(new TestPageStore());
addTest(new TestPageStoreCoverage());
addTest(new TestPgServer());
addTest(new TestRecovery());
addTest(new RecoverLobTest());
addTest(createTest("org.h2.test.unit.TestServlet"));
addTest(new TestTimeStampWithTimeZone());
addTest(new TestUpgrade());
addTest(new TestUsingIndex());
addTest(new TestValue());
addTest(new TestWeb());
runAddedTests();
addTest(new TestCluster());
addTest(new TestFileLockSerialized());
addTest(new TestFileLockProcess());
addTest(new TestFileSystem());
addTest(new TestTools());
addTest(new TestSampleApps());
runAddedTests(1);
}
/**
* Run tests for utilities.
*/
private void testUtils() {
System.out.println();
System.out.println("Test utilities (" + Utils.getMemoryUsed() + " KB used)");
// mv store // mv store
addTest(new TestCacheConcurrentLIRS()); addTest(new TestCacheConcurrentLIRS());
addTest(new TestCacheLIRS()); addTest(new TestCacheLIRS());
...@@ -889,7 +946,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -889,7 +946,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
addTest(new TestMVStoreBenchmark()); addTest(new TestMVStoreBenchmark());
addTest(new TestMVStoreStopCompact()); addTest(new TestMVStoreStopCompact());
addTest(new TestMVStoreTool()); addTest(new TestMVStoreTool());
addTest(new TestMVTableEngine());
addTest(new TestObjectDataType()); addTest(new TestObjectDataType());
addTest(new TestRandomMapOps()); addTest(new TestRandomMapOps());
addTest(new TestSpinLock()); addTest(new TestSpinLock());
...@@ -898,77 +954,46 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -898,77 +954,46 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
// unit // unit
addTest(new TestAnsCompression()); addTest(new TestAnsCompression());
addTest(new TestAutoReconnect());
addTest(new TestBinaryArithmeticStream()); addTest(new TestBinaryArithmeticStream());
addTest(new TestBitStream()); addTest(new TestBitStream());
addTest(new TestBnf());
addTest(new TestCache());
addTest(new TestCharsetCollator()); addTest(new TestCharsetCollator());
addTest(new TestClearReferences()); addTest(new TestClearReferences());
addTest(new TestCollation());
addTest(new TestCompress());
addTest(new TestConnectionInfo());
addTest(new TestDataPage()); addTest(new TestDataPage());
addTest(new TestDateIso8601()); addTest(new TestDateIso8601());
addTest(new TestExit());
addTest(new TestFile()); addTest(new TestFile());
addTest(new TestFileLock());
addTest(new TestFtp()); addTest(new TestFtp());
addTest(new TestIntArray()); addTest(new TestIntArray());
addTest(new TestIntIntHashMap()); addTest(new TestIntIntHashMap());
addTest(new TestIntPerfectHash()); addTest(new TestIntPerfectHash());
addTest(new TestJmx());
addTest(new TestMathUtils()); addTest(new TestMathUtils());
addTest(new TestMode()); addTest(new TestMode());
addTest(new TestModifyOnWrite());
addTest(new TestOldVersion());
addTest(new TestObjectDeserialization()); addTest(new TestObjectDeserialization());
addTest(new TestMultiThreadedKernel());
addTest(new TestOverflow()); addTest(new TestOverflow());
addTest(new TestPageStore());
addTest(new TestPageStoreCoverage());
addTest(new TestPerfectHash()); addTest(new TestPerfectHash());
addTest(new TestPgServer());
addTest(new TestReader()); addTest(new TestReader());
addTest(new TestRecovery());
addTest(new TestScriptReader()); addTest(new TestScriptReader());
addTest(new RecoverLobTest());
addTest(createTest("org.h2.test.unit.TestServlet"));
addTest(new TestSecurity()); addTest(new TestSecurity());
addTest(new TestShell()); addTest(new TestShell());
addTest(new TestSort()); addTest(new TestSort());
addTest(new TestStreams()); addTest(new TestStreams());
addTest(new TestStringUtils()); addTest(new TestStringUtils());
addTest(new TestTimeStampWithTimeZone());
addTest(new TestTraceSystem()); addTest(new TestTraceSystem());
addTest(new TestUpgrade());
addTest(new TestUsingIndex());
addTest(new TestUtils()); addTest(new TestUtils());
addTest(new TestValue());
addTest(new TestValueHashMap()); addTest(new TestValueHashMap());
addTest(new TestWeb());
runAddedTests(); runAddedTests();
// serial // serial
addTest(new TestDate()); addTest(new TestDate());
addTest(new TestDateTimeUtils()); addTest(new TestDateTimeUtils());
addTest(new TestCluster());
addTest(new TestConcurrent()); addTest(new TestConcurrent());
addTest(new TestFileLockSerialized());
addTest(new TestFileLockProcess());
addTest(new TestFileSystem());
addTest(new TestNetUtils()); addTest(new TestNetUtils());
addTest(new TestPattern()); addTest(new TestPattern());
addTest(new TestTools());
addTest(new TestSampleApps());
addTest(new TestStringCache()); addTest(new TestStringCache());
addTest(new TestValueMemory()); addTest(new TestValueMemory());
addTest(new TestAuthentication()); addTest(new TestAuthentication());
runAddedTests(1); runAddedTests(1);
} }
private void addTest(TestBase test) { private void addTest(TestBase test) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论