ygerzhedovich commented on code in PR #2616:
URL: https://github.com/apache/ignite-3/pull/2616#discussion_r1337080011
##########
modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcComplexQuerySelfTest.java:
##########
@@ -209,21 +208,25 @@ public void testWrongArgumentType() throws Exception {
}
// Check non-indexed field.
- assertThrows(SQLException.class, () -> {
- try (ResultSet rs = stmt.executeQuery("select * from PUBLIC.Org
where name = 2")) {
- assertFalse(rs.next());
- }
- });
+ JdbcTestUtils.assertThrowsSqlException(
+ "For input string: \"B\"",
+ () -> {
+ try (ResultSet rs = stmt.executeQuery("select * from
PUBLIC.Org where name = 2")) {
+ assertFalse(rs.next());
+ }
+ });
// Check indexed field.
try (ResultSet rs = stmt.executeQuery("select * from PUBLIC.Person
where name = '2'")) {
assertFalse(rs.next());
}
- assertThrows(SQLException.class, () -> {
- try (ResultSet rs = stmt.executeQuery("select * from PUBLIC.Person
where name = 2")) {
- assertFalse(rs.next());
- }
- });
+ JdbcTestUtils.assertThrowsSqlException(
+ "For input string: \"Mike Green\"",
+ () -> {
+ try (ResultSet rs = stmt.executeQuery("select * from
PUBLIC.Person where name = 2")) {
+ assertFalse(rs.next());
+ }
+ });
Review Comment:
don't agree, I want to close ResultSet. Unfortunately we don't follow the
rules everywhere, but it's good to close RS
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]