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

Cleanup.

上级 86fba974
......@@ -407,7 +407,7 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
private void testCheckConstraintErrorMessage() throws SQLException {
Connection conn = getConnection("trigger");
Statement stat = conn.createStatement();
stat.execute("create table companies(id identity)");
stat.execute("create table departments(id identity, "
+ "company_id int not null, "
......@@ -425,15 +425,15 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
stat.execute("insert into departments(id, company_id) "
+ "values(20, 1)");
assertThrows(ErrorCode.CHECK_CONSTRAINT_INVALID, stat)
.execute("insert into connections(id, company_id, first, second) "
+ "values(100, 1, 10, 20)");
.execute("insert into connections(id, company_id, first, second) "
+ "values(100, 1, 10, 20)");
stat.execute("drop table connections");
stat.execute("drop table departments");
stat.execute("drop table companies");
conn.close();
}
/**
* Regression test: we had a bug where the AlterTableAddConstraint class
* used to sometimes pick the wrong unique index for a foreign key.
......
......@@ -280,7 +280,8 @@ public class TestPgServer extends TestBase {
Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5535/test", "sa", "sa");
Statement stat = conn.createStatement();
// confirm that we've got the in memory implementation by creating a table and checking flags
// confirm that we've got the in memory implementation
// by creating a table and checking flags
stat.execute("create table test(id int primary key, name varchar)");
ResultSet rs = stat.executeQuery("select storage_type from information_schema.tables where table_name = 'TEST'");
assertTrue(rs.next());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论