kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lid...@apache.org
Subject [1/2] kylin git commit: minor, some ResultSet are not closed
Date Wed, 20 Apr 2016 08:34:34 GMT
Repository: kylin
Updated Branches:
  refs/heads/master dc1671ca5 -> 155291fda


minor, some ResultSet are not closed


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3a0ba36f
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3a0ba36f
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3a0ba36f

Branch: refs/heads/master
Commit: 3a0ba36f339920309cab7521efdc622eb702e026
Parents: dc1671c
Author: lidongsjtu <lidong@apache.org>
Authored: Mon Apr 18 23:43:28 2016 +0800
Committer: lidongsjtu <lidong@apache.org>
Committed: Wed Apr 20 11:38:02 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/jdbc/DriverTest.java   | 19 +++++++++++++++++++
 .../org/apache/kylin/jdbc/ITJDBCDriverTest.java  |  2 ++
 .../storage/hbase/common/HiveJDBCClientTest.java |  5 +++++
 3 files changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/3a0ba36f/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java b/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
index 9d1c29b..81b303e 100644
--- a/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
+++ b/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
@@ -65,6 +65,10 @@ public class DriverTest {
             assertEquals("bar", resultSet.getString(2));
             assertEquals("tool", resultSet.getString(3));
         }
+
+        resultSet.close();
+        state.close();
+        conn.close();
     }
 
     @Test
@@ -86,6 +90,10 @@ public class DriverTest {
             assertEquals("bar", resultSet.getString(2));
             assertEquals("tool", resultSet.getString(3));
         }
+
+        resultSet.close();
+        state.close();
+        conn.close();
     }
 
     @Ignore("require dev sandbox")
@@ -118,7 +126,14 @@ public class DriverTest {
 
             printResultSetMetaData(resultSet);
             printResultSet(resultSet);
+
+            resultSet.close();
         }
+
+        catalogs.close();
+        schemas.close();
+        tables.close();
+        conn.close();
     }
 
     @Ignore("require dev sandbox")
@@ -136,6 +151,10 @@ public class DriverTest {
 
         printResultSetMetaData(resultSet);
         printResultSet(resultSet);
+
+        resultSet.close();
+        state.close();
+        conn.close();
     }
 
     private void printResultSet(ResultSet rs) throws SQLException {

http://git-wip-us.apache.org/repos/asf/kylin/blob/3a0ba36f/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java b/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java
index 44600de..8ad0888 100644
--- a/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java
@@ -132,6 +132,8 @@ public class ITJDBCDriverTest extends HBaseMetadataTestCase {
             catalogList.add(catalog);
 
         }
+
+        resultSet.close();
         Assert.assertTrue(catalogList.size() > 0 && catalogList.contains("defaultCatalog"));
 
         /** //Disable the test on getTableTypes() as it is not ready

http://git-wip-us.apache.org/repos/asf/kylin/blob/3a0ba36f/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/common/HiveJDBCClientTest.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/common/HiveJDBCClientTest.java
b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/common/HiveJDBCClientTest.java
index 1a20edc..d2b3488 100644
--- a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/common/HiveJDBCClientTest.java
+++ b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/common/HiveJDBCClientTest.java
@@ -130,6 +130,9 @@ public class HiveJDBCClientTest {
             System.out.println(res.getInt(1));
         }
         res.close();
+
+        stmt.close();
+        con.close();
     }
 
     //@Test
@@ -150,6 +153,8 @@ public class HiveJDBCClientTest {
             System.out.println("---" + res.getString(1) + " | " + res.getString(2));
         }
 
+        res.close();
+        con.close();
     }
 
     protected ResultSet executeSQL(Connection con, String sql) throws SQLException {


Mime
View raw message