[ 
https://issues.apache.org/jira/browse/KYLIN-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625450#comment-16625450
 ] 

ASF GitHub Bot commented on KYLIN-3575:
---------------------------------------

shaofengshi closed pull request #242: KYLIN-3575, fix unclosed JDBC connection 
in DriverTest.
URL: https://github.com/apache/kylin/pull/242
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 11dbcde45d..1ffec6d132 100644
--- a/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
+++ b/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
@@ -221,6 +221,7 @@ public void testSSLFromURL() throws SQLException {
         assertEquals("test_url", ((KylinConnection) conn).getBaseUrl());
         assertEquals("test_db", ((KylinConnection) conn).getProject());
         assertTrue(Boolean.parseBoolean((String) ((KylinConnection) 
conn).getConnectionProperties().get("ssl")));
+        conn.close();
     }
 
     @Test
@@ -245,6 +246,8 @@ public void testCalciteProps() throws SQLException {
         assertEquals("false", 
connProps2.getProperty("kylin.query.calcite.extras-props.caseSensitive"));
         assertEquals("UNCHANGED", 
connProps2.getProperty("kylin.query.calcite.extras-props.unquotedCasing"));
         assertEquals("BACK_TICK", 
connProps2.getProperty("kylin.query.calcite.extras-props.quoting"));
+        conn.close();
+        conn2.close();
     }
 
     private void printResultSet(ResultSet rs) throws SQLException {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Unclosed Connection in DriverTest
> ---------------------------------
>
>                 Key: KYLIN-3575
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3575
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: jiatao.tao
>            Priority: Minor
>             Fix For: v2.6.0
>
>
> In testCalciteProps :
> {code}
>         KylinConnection conn = (KylinConnection) 
> driver.connect("jdbc:kylin:test_url/test_db", props);
> {code}
> The connection should be closed upon return.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to