提交 76db4d99 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Adjust TestViewAlterTable

上级 8c639ee4
...@@ -73,7 +73,7 @@ public class TestViewAlterTable extends TestDb { ...@@ -73,7 +73,7 @@ public class TestViewAlterTable extends TestDb {
stat.execute("create table test(id identity, name varchar) " + stat.execute("create table test(id identity, name varchar) " +
"as select x, 'Hello'"); "as select x, 'Hello'");
stat.execute("create view test_view as select * from test"); stat.execute("create view test_view as select * from test");
assertThrows(ErrorCode.VIEW_IS_INVALID_2, stat). assertThrows(ErrorCode.COLUMN_IS_REFERENCED_1, stat).
execute("alter table test drop name"); execute("alter table test drop name");
ResultSet rs = stat.executeQuery("select * from test_view"); ResultSet rs = stat.executeQuery("select * from test_view");
assertTrue(rs.next()); assertTrue(rs.next());
...@@ -83,7 +83,7 @@ public class TestViewAlterTable extends TestDb { ...@@ -83,7 +83,7 @@ public class TestViewAlterTable extends TestDb {
// nested // nested
createTestData(); createTestData();
// should throw exception because V1 uses column A // should throw exception because V1 uses column A
assertThrows(ErrorCode.VIEW_IS_INVALID_2, stat). assertThrows(ErrorCode.COLUMN_IS_REFERENCED_1, stat).
execute("alter table test drop column a"); execute("alter table test drop column a");
stat.execute("drop table test cascade"); stat.execute("drop table test cascade");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论