You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2016/12/19 20:23:54 UTC

calcite git commit: In JdbcAdapterTest, remember to release lock if updates yield an exception

Repository: calcite
Updated Branches:
  refs/heads/master cd8060894 -> 34c744107


In JdbcAdapterTest, remember to release lock if updates yield an exception


Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/34c74410
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/34c74410
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/34c74410

Branch: refs/heads/master
Commit: 34c74410753cf38ab75ecfeee27c94115f535ff0
Parents: cd80608
Author: Julian Hyde <jh...@apache.org>
Authored: Sun Dec 18 22:26:58 2016 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Sun Dec 18 22:26:58 2016 -0800

----------------------------------------------------------------------
 core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/34c74410/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java b/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
index d24d596..3e7c301 100644
--- a/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
+++ b/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
@@ -642,6 +642,9 @@ public class JdbcAdapterTest {
       int rowCount = statement.executeUpdate(iSql);
       assertThat(rowCount, is(1));
       return wrapper;
+    } catch (SQLException | RuntimeException | Error e) {
+      wrapper.close();
+      throw e;
     }
   }