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

Simplified test cases using assertThrows(...).

上级 bf0e5b35
......@@ -99,7 +99,7 @@ public class TestLob extends TestBase {
}
private void testCreateIndexOnLob() throws Exception {
if (!config.memory) {
if (config.memory) {
return;
}
deleteDb("lob");
......
......@@ -253,8 +253,13 @@ public class TestTransaction extends TestBase {
c2.setAutoCommit(false);
s1.executeUpdate("insert into A(code) values('one')");
Statement s2 = c2.createStatement();
assertThrows(ErrorCode.LOCK_TIMEOUT_1, s2).
executeUpdate("insert into B values('two', 1)");
if (config.mvcc) {
assertThrows(ErrorCode.REFERENTIAL_INTEGRITY_VIOLATED_PARENT_MISSING_1, s2).
executeUpdate("insert into B values('two', 1)");
} else {
assertThrows(ErrorCode.LOCK_TIMEOUT_1, s2).
executeUpdate("insert into B values('two', 1)");
}
c2.commit();
c1.rollback();
c1.close();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论