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

Temporary change for testing

上级 c28b5ca2
...@@ -660,7 +660,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -660,7 +660,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
// new TestReadOnly().runTest(this); // new TestReadOnly().runTest(this);
// new TestRecursiveQueries().runTest(this); // new TestRecursiveQueries().runTest(this);
// new TestRights().runTest(this); // new TestRights().runTest(this);
new TestRunscript().runTest(this); // new TestRunscript().runTest(this);
// new TestSQLInjection().runTest(this); // new TestSQLInjection().runTest(this);
// new TestSessionsLocks().runTest(this); // new TestSessionsLocks().runTest(this);
// new TestSelectCountNonNullColumn().runTest(this); // new TestSelectCountNonNullColumn().runTest(this);
...@@ -716,9 +716,9 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -716,9 +716,9 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
// // server // // server
// new TestAutoServer().runTest(this); // new TestAutoServer().runTest(this);
// new TestNestedLoop().runTest(this); // new TestNestedLoop().runTest(this);
new TestWeb().runTest(this); // new TestWeb().runTest(this);
//
// mvcc & row level locking // // mvcc & row level locking
// new TestMvcc1().runTest(this); // new TestMvcc1().runTest(this);
// new TestMvcc2().runTest(this); // new TestMvcc2().runTest(this);
// new TestMvcc3().runTest(this); // new TestMvcc3().runTest(this);
......
...@@ -85,10 +85,8 @@ public class TestTools extends TestBase { ...@@ -85,10 +85,8 @@ public class TestTools extends TestBase {
testConsole(); testConsole();
testJdbcDriverUtils(); testJdbcDriverUtils();
testWrongServer(); testWrongServer();
deleteDb("utils");
testDeleteFiles(); testDeleteFiles();
testScriptRunscriptLob(); testScriptRunscriptLob();
deleteDb("utils");
testServerMain(); testServerMain();
testRemove(); testRemove();
testConvertTraceFile(); testConvertTraceFile();
...@@ -101,7 +99,6 @@ public class TestTools extends TestBase { ...@@ -101,7 +99,6 @@ public class TestTools extends TestBase {
testScriptRunscript(); testScriptRunscript();
testBackupRestore(); testBackupRestore();
testRecover(); testRecover();
deleteDb("utils");
FileUtils.delete(getBaseDir() + "/b2.sql"); FileUtils.delete(getBaseDir() + "/b2.sql");
FileUtils.delete(getBaseDir() + "/b2.sql.txt"); FileUtils.delete(getBaseDir() + "/b2.sql.txt");
FileUtils.delete(getBaseDir() + "/b2.zip"); FileUtils.delete(getBaseDir() + "/b2.zip");
...@@ -851,28 +848,28 @@ public class TestTools extends TestBase { ...@@ -851,28 +848,28 @@ public class TestTools extends TestBase {
org.h2.Driver.load(); org.h2.Driver.load();
final String dir = (split ? "split:19:" : "") + getBaseDir(); final String dir = (split ? "split:19:" : "") + getBaseDir();
String url = "jdbc:h2:" + dir; String url = "jdbc:h2:" + dir;
DeleteDbFiles.execute(dir, "utils", true); DeleteDbFiles.execute(dir, "testChangeFileEncryption", true);
Connection conn = getConnection(url + "/utils;CIPHER=XTEA", "sa", "abc 123"); Connection conn = getConnection(url + "/testChangeFileEncryption;CIPHER=XTEA", "sa", "abc 123");
Statement stat = conn.createStatement(); Statement stat = conn.createStatement();
stat.execute("CREATE TABLE TEST(ID INT PRIMARY KEY, DATA CLOB) " + stat.execute("CREATE TABLE TEST(ID INT PRIMARY KEY, DATA CLOB) " +
"AS SELECT X, SPACE(3000) FROM SYSTEM_RANGE(1, 300)"); "AS SELECT X, SPACE(3000) FROM SYSTEM_RANGE(1, 300)");
conn.close(); conn.close();
String[] args = { "-dir", dir, "-db", "utils", "-cipher", "XTEA", "-decrypt", "abc", "-quiet" }; String[] args = { "-dir", dir, "-db", "testChangeFileEncryption", "-cipher", "XTEA", "-decrypt", "abc", "-quiet" };
ChangeFileEncryption.main(args); ChangeFileEncryption.main(args);
args = new String[] { "-dir", dir, "-db", "utils", "-cipher", "AES", "-encrypt", "def", "-quiet" }; args = new String[] { "-dir", dir, "-db", "testChangeFileEncryption", "-cipher", "AES", "-encrypt", "def", "-quiet" };
ChangeFileEncryption.main(args); ChangeFileEncryption.main(args);
conn = getConnection(url + "/utils;CIPHER=AES", "sa", "def 123"); conn = getConnection(url + "/testChangeFileEncryption;CIPHER=AES", "sa", "def 123");
stat = conn.createStatement(); stat = conn.createStatement();
stat.execute("SELECT * FROM TEST"); stat.execute("SELECT * FROM TEST");
new AssertThrows(ErrorCode.CANNOT_CHANGE_SETTING_WHEN_OPEN_1) { new AssertThrows(ErrorCode.CANNOT_CHANGE_SETTING_WHEN_OPEN_1) {
@Override @Override
public void test() throws SQLException { public void test() throws SQLException {
ChangeFileEncryption.main(new String[] { ChangeFileEncryption.main(new String[] {
"-dir", dir, "-db", "utils", "-cipher", "AES", "-decrypt", "def", "-quiet" }); "-dir", dir, "-db", "testChangeFileEncryption", "-cipher", "AES", "-decrypt", "def", "-quiet" });
} }
}; };
conn.close(); conn.close();
args = new String[] { "-dir", dir, "-db", "utils", "-quiet" }; args = new String[] { "-dir", dir, "-db", "testChangeFileEncryption", "-quiet" };
DeleteDbFiles.main(args); DeleteDbFiles.main(args);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论