snuyanzin commented on code in PR #18:
URL: 
https://github.com/apache/flink-connector-jdbc/pull/18#discussion_r1098465339


##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/JdbcInputFormatTest.java:
##########
@@ -192,11 +191,8 @@ void testDefaultFetchSizeIsUsedIfNotConfiguredOtherwise()
                         .finish();
         jdbcInputFormat.openInputFormat();
 
-        Class.forName(DERBY_EBOOKSHOP_DB.getDriverClass());
         final int defaultFetchSize =
-                DriverManager.getConnection(DERBY_EBOOKSHOP_DB.getUrl())
-                        .createStatement()
-                        .getFetchSize();
+                
DERBY_EBOOKSHOP_DB.getConnection().createStatement().getFetchSize();

Review Comment:
   Shouldn't we close statement here?



##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/JdbcInputFormatTest.java:
##########
@@ -192,11 +191,8 @@ void testDefaultFetchSizeIsUsedIfNotConfiguredOtherwise()
                         .finish();
         jdbcInputFormat.openInputFormat();
 
-        Class.forName(DERBY_EBOOKSHOP_DB.getDriverClass());
         final int defaultFetchSize =
-                DriverManager.getConnection(DERBY_EBOOKSHOP_DB.getUrl())
-                        .createStatement()
-                        .getFetchSize();
+                
DERBY_EBOOKSHOP_DB.getConnection().createStatement().getFetchSize();
 
         
assertThat(jdbcInputFormat.getStatement().getFetchSize()).isEqualTo(defaultFetchSize);

Review Comment:
   Shouldn't we close statement here?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to