提交 722d3753 authored 作者: ravd's avatar ravd 提交者: AniaIRafal

Fixed UT for lazy env

上级 4ba32c2c
...@@ -492,8 +492,13 @@ public class TestPreparedStatement extends TestBase { ...@@ -492,8 +492,13 @@ public class TestPreparedStatement extends TestBase {
for (int i = 0; i < badSizes.length; i++) { for (int i = 0; i < badSizes.length; i++) {
PreparedStatement prep = conn.prepareStatement("SELECT * FROM test_enum WHERE size = ?"); PreparedStatement prep = conn.prepareStatement("SELECT * FROM test_enum WHERE size = ?");
prep.setObject(1, badSizes[i]); prep.setObject(1, badSizes[i]);
if (config.lazy) {
ResultSet resultSet = prep.executeQuery();
assertThrows(ErrorCode.ENUM_VALUE_NOT_PERMITTED, resultSet).next();
} else {
assertThrows(ErrorCode.ENUM_VALUE_NOT_PERMITTED, prep).executeQuery(); assertThrows(ErrorCode.ENUM_VALUE_NOT_PERMITTED, prep).executeQuery();
} }
}
stat.execute("DROP TABLE test_enum"); stat.execute("DROP TABLE test_enum");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论