Repository: calcite-avatica
Updated Branches:
  refs/heads/master 110f1818f -> 4ac7e1c11


[CALCITE-2022] add dynamic drive calculation in case of Windows

Closes #54

Signed-off-by: Josh Elser <[email protected]>


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

Branch: refs/heads/master
Commit: 4ac7e1c11f8fc869436b48ba7b34a75d04fe38d3
Parents: 110f181
Author: snuyanzin <[email protected]>
Authored: Thu May 31 14:08:21 2018 +0300
Committer: Josh Elser <[email protected]>
Committed: Thu May 31 20:56:45 2018 -0400

----------------------------------------------------------------------
 .../org/apache/calcite/avatica/ConnectionConfigImplTest.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/4ac7e1c1/core/src/test/java/org/apache/calcite/avatica/ConnectionConfigImplTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/calcite/avatica/ConnectionConfigImplTest.java 
b/core/src/test/java/org/apache/calcite/avatica/ConnectionConfigImplTest.java
index 71f4b66..227acd3 100644
--- 
a/core/src/test/java/org/apache/calcite/avatica/ConnectionConfigImplTest.java
+++ 
b/core/src/test/java/org/apache/calcite/avatica/ConnectionConfigImplTest.java
@@ -19,6 +19,7 @@ package org.apache.calcite.avatica;
 import org.junit.Test;
 
 import java.io.File;
+import java.nio.file.Paths;
 import java.util.Properties;
 
 import static org.hamcrest.core.Is.is;
@@ -32,14 +33,15 @@ public class ConnectionConfigImplTest {
 
   @Test public void testTrustStore() {
     final String trustStore = "/my/truststore.jks";
-    final String windowsTrustStore = "C:\\my\\truststore.jks";
+    final String windowsTrustStore = "my\\truststore.jks";
     final String pw = "supremelysecret";
     Properties props = new Properties();
     props.setProperty(BuiltInConnectionProperty.TRUSTSTORE.name(), trustStore);
     props.setProperty(BuiltInConnectionProperty.TRUSTSTORE_PASSWORD.name(), 
pw);
     ConnectionConfigImpl config = new ConnectionConfigImpl(props);
     assertThat(config.truststore().getAbsolutePath(),
-        File.separatorChar == '/' ? is(trustStore) : is(windowsTrustStore));
+        File.separatorChar == '/' ? is(trustStore)
+                : is(Paths.get(".").toAbsolutePath().getRoot() + 
windowsTrustStore));
     assertThat(config.truststorePassword(), is(pw));
   }
 

Reply via email to