RussellSpitzer commented on code in PR #12140:
URL: https://github.com/apache/iceberg/pull/12140#discussion_r1938259640


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveMetastore.java:
##########
@@ -273,13 +274,13 @@ private void initConf(HiveConf conf, int port) {
   }
 
   private static void setupMetastoreDB(String dbURL) throws SQLException, 
IOException {
-    Connection connection = DriverManager.getConnection(dbURL);
-    ScriptRunner scriptRunner = new ScriptRunner(connection, true, true);
+    try (Connection connection = DriverManager.getConnection(dbURL)) {

Review Comment:
   I think we should still fail if this doesn't work, so Try with resources is 
good but we should rethrow after closing



-- 
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...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to