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

Test

上级 4a0722eb
...@@ -46,6 +46,8 @@ public class SourceCompiler { ...@@ -46,6 +46,8 @@ public class SourceCompiler {
try { try {
clazz = Class.forName("com.sun.tools.javac.Main"); clazz = Class.forName("com.sun.tools.javac.Main");
} catch (Exception e) { } catch (Exception e) {
int todoTesting;
e.printStackTrace();
clazz = null; clazz = null;
} }
JAVAC_SUN = clazz; JAVAC_SUN = clazz;
......
...@@ -531,38 +531,38 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -531,38 +531,38 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
beforeTest(); beforeTest();
// db // db
new TestScriptSimple().runTest(this); // new TestScriptSimple().runTest(this);
new TestScript().runTest(this); // new TestScript().runTest(this);
new TestAlter().runTest(this); // new TestAlter().runTest(this);
new TestAlterSchemaRename().runTest(this); // new TestAlterSchemaRename().runTest(this);
new TestAutoRecompile().runTest(this); // new TestAutoRecompile().runTest(this);
new TestBitField().runTest(this); // new TestBitField().runTest(this);
new TestBackup().runTest(this); // new TestBackup().runTest(this);
new TestBigDb().runTest(this); // new TestBigDb().runTest(this);
new TestBigResult().runTest(this); // new TestBigResult().runTest(this);
new TestCases().runTest(this); // new TestCases().runTest(this);
new TestCheckpoint().runTest(this); // new TestCheckpoint().runTest(this);
new TestCluster().runTest(this); // new TestCluster().runTest(this);
new TestCompatibility().runTest(this); // new TestCompatibility().runTest(this);
new TestCsv().runTest(this); // new TestCsv().runTest(this);
new TestDateStorage().runTest(this); // new TestDateStorage().runTest(this);
new TestDeadlock().runTest(this); // new TestDeadlock().runTest(this);
new TestEncryptedDb().runTest(this); // new TestEncryptedDb().runTest(this);
new TestExclusive().runTest(this); // new TestExclusive().runTest(this);
new TestFullText().runTest(this); // new TestFullText().runTest(this);
new TestFunctionOverload().runTest(this); // new TestFunctionOverload().runTest(this);
new TestFunctions().runTest(this); // new TestFunctions().runTest(this);
new TestInit().runTest(this); // new TestInit().runTest(this);
new TestIndex().runTest(this); // new TestIndex().runTest(this);
new TestLargeBlob().runTest(this); // new TestLargeBlob().runTest(this);
new TestLinkedTable().runTest(this); // new TestLinkedTable().runTest(this);
new TestListener().runTest(this); // new TestListener().runTest(this);
new TestLob().runTest(this); // new TestLob().runTest(this);
new TestMemoryUsage().runTest(this); // new TestMemoryUsage().runTest(this);
new TestMultiConn().runTest(this); // new TestMultiConn().runTest(this);
new TestMultiDimension().runTest(this); // new TestMultiDimension().runTest(this);
new TestMultiThread().runTest(this); // new TestMultiThread().runTest(this);
new TestMultiThreadedKernel().runTest(this); // new TestMultiThreadedKernel().runTest(this);
new TestOpenClose().runTest(this); new TestOpenClose().runTest(this);
new TestOptimizations().runTest(this); new TestOptimizations().runTest(this);
new TestOutOfMemory().runTest(this); new TestOutOfMemory().runTest(this);
......
...@@ -76,12 +76,15 @@ public class TestOpenClose extends TestBase implements DatabaseEventListener { ...@@ -76,12 +76,15 @@ public class TestOpenClose extends TestBase implements DatabaseEventListener {
FileObject f = FileSystem.getInstance(getBaseDir()).openFileObject(getBaseDir() + "/openClose2.h2.db.1.part", "rw"); FileObject f = FileSystem.getInstance(getBaseDir()).openFileObject(getBaseDir() + "/openClose2.h2.db.1.part", "rw");
f.setFileLength(f.length() * 2); f.setFileLength(f.length() * 2);
f.close(); f.close();
try { int testing;
assertThrows(ErrorCode.IO_EXCEPTION_2, (TestBase) this).
getConnection("jdbc:h2:split:18:" + getBaseDir() + "/openClose2"); getConnection("jdbc:h2:split:18:" + getBaseDir() + "/openClose2");
fail(); // try {
} catch (SQLException e) { // getConnection("jdbc:h2:split:18:" + getBaseDir() + "/openClose2");
assertEquals(ErrorCode.IO_EXCEPTION_2, e.getErrorCode()); // fail();
} // } catch (SQLException e) {
// assertEquals(ErrorCode.IO_EXCEPTION_2, e.getErrorCode());
// }
FileSystem.getInstance("split:").delete("split:" + getBaseDir() + "/openClose2.h2.db"); FileSystem.getInstance("split:").delete("split:" + getBaseDir() + "/openClose2.h2.db");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论