You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by kr...@apache.org on 2018/05/30 01:32:17 UTC

calcite git commit: Fix invalid isValid assumption in CalciteRemoteDriverTest

Repository: calcite
Updated Branches:
  refs/heads/master e7a4e8431 -> 542d51265


Fix invalid isValid assumption in CalciteRemoteDriverTest

CalciteRemoteDriverTest assumed that isValid(0) would always
throw a SQLException from Avatica. CALCITE-1520 fixed isValid
to work correctly in Avatica. If checking the connection for
proper exception passing, Calcite should use isValid(-1) to
force a SQLException due to the JDBC specification.

Signed-off-by: Kevin Risden <kr...@apache.org>


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

Branch: refs/heads/master
Commit: 542d51265d683dfd736c5e04f556e065b3667667
Parents: e7a4e84
Author: Kevin Risden <kr...@apache.org>
Authored: Tue May 29 20:29:20 2018 -0500
Committer: Kevin Risden <kr...@apache.org>
Committed: Tue May 29 20:29:24 2018 -0500

----------------------------------------------------------------------
 .../test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/542d5126/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java b/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java
index 502f02b..1c3ff40 100644
--- a/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java
+++ b/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java
@@ -463,7 +463,7 @@ public class CalciteRemoteDriverTest {
 
   @Test(expected = SQLException.class)
   public void testAvaticaConnectionException() throws Exception {
-    remoteConnection.isValid(0);
+    remoteConnection.isValid(-1);
   }
 
   @Test(expected = SQLException.class)