You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2017/12/19 08:24:12 UTC

[GitHub] sijie closed pull request #880: Issue 879: TestTLS fails when project path contains spaces

sijie closed pull request #880: Issue 879: TestTLS fails when project path contains spaces
URL: https://github.com/apache/bookkeeper/pull/880
 
 
   

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/bookkeeper-server/src/test/java/org/apache/bookkeeper/tls/TestTLS.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/tls/TestTLS.java
index 4613ebe1f..65cb7d1de 100644
--- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/tls/TestTLS.java
+++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/tls/TestTLS.java
@@ -83,25 +83,29 @@ public void setUp() throws Exception {
         baseClientConf.setTLSProviderFactoryClass(TLSContextFactory.class.getName());
         baseClientConf.setTLSClientAuthentication(true);
         baseClientConf.setTLSKeyStoreType("JKS");
-        baseClientConf.setTLSKeyStore(this.getClass().getClassLoader().getResource("client.jks").getPath());
+        baseClientConf.setTLSKeyStore(
+            this.getClass().getClassLoader().getResource("client.jks").toURI().getPath());
         baseClientConf.setTLSKeyStorePasswordPath(
-                this.getClass().getClassLoader().getResource("keyStoreClientPassword.txt").getPath());
+            this.getClass().getClassLoader().getResource("keyStoreClientPassword.txt").toURI().getPath());
         baseClientConf.setTLSTrustStoreType("JKS");
-        baseClientConf.setTLSTrustStore(this.getClass().getClassLoader().getResource("cacerts").getPath());
+        baseClientConf.setTLSTrustStore(
+            this.getClass().getClassLoader().getResource("cacerts").toURI().getPath());
         baseClientConf.setTLSTrustStorePasswordPath(
-                this.getClass().getClassLoader().getResource("trustStorePassword.txt").getPath());
+            this.getClass().getClassLoader().getResource("trustStorePassword.txt").toURI().getPath());
 
         /* server configuration */
         baseConf.setTLSProviderFactoryClass(TLSContextFactory.class.getName());
         baseConf.setTLSClientAuthentication(true);
         baseConf.setTLSKeyStoreType("JKS");
-        baseConf.setTLSKeyStore(this.getClass().getClassLoader().getResource("server.jks").getPath());
+        baseConf.setTLSKeyStore(
+            this.getClass().getClassLoader().getResource("server.jks").toURI().getPath());
         baseConf.setTLSKeyStorePasswordPath(
-                this.getClass().getClassLoader().getResource("keyStoreServerPassword.txt").getPath());
+            this.getClass().getClassLoader().getResource("keyStoreServerPassword.txt").toURI().getPath());
         baseConf.setTLSTrustStoreType("JKS");
-        baseConf.setTLSTrustStore(this.getClass().getClassLoader().getResource("cacerts").getPath());
+        baseConf.setTLSTrustStore(
+            this.getClass().getClassLoader().getResource("cacerts").toURI().getPath());
         baseConf.setTLSTrustStorePasswordPath(
-                this.getClass().getClassLoader().getResource("trustStorePassword.txt").getPath());
+            this.getClass().getClassLoader().getResource("trustStorePassword.txt").toURI().getPath());
 
         super.setUp();
     }


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services