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

ASF GitHub Bot commented on QUARKS-52:
--------------------------------------

GitHub user dlaboss opened a pull request:

    https://github.com/apache/incubator-quarks/pull/33

    [QUARKS-52] fix test keystore path formation on windows

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dlaboss/incubator-quarks 
quarks-52-websocketclienttest

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-quarks/pull/33.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #33
    
----
commit a6fb910926cc78de102d1742789f8a8d3d627e63
Author: Dale LaBossiere <[email protected]>
Date:   2016-03-21T22:28:07Z

    [QUARKS-52] fix test keystore path formation on windows

----


> WebSocketClientTest errors  on Windows  with 
> java.lang.IllegalArgumentException: File does not exist ... 
> serverKeyStore.jks 
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: QUARKS-52
>                 URL: https://issues.apache.org/jira/browse/QUARKS-52
>             Project: Quarks
>          Issue Type: Bug
>          Components: Test
>            Reporter: Kathey Marsden
>            Assignee: Dale LaBossiere
>            Priority: Minor
>              Labels: windows
>         Attachments: 
> TEST-quarks.tests.connectors.wsclient.javax.websocket.WebSocketClientTest.xml
>
>
> WebSocketClientTest errors with the following exception
> java.lang.RuntimeException: startEchoer
> at 
> quarks.tests.connectors.wsclient.javax.websocket.WebSocketClientTest.startEchoer(WebSocketClientTest.java:68)
> at 
> quarks.tests.connectors.wsclient.javax.websocket.WebSocketClientTest.testSslSystemProperty(WebSocketCliientTest.java:390)
> Caused by: java.lang.IllegalArgumentException: File does not exist: 
> C:\cygwin\/wsclient-javax.websocket/src/test/keystores/serverKeyStore.jks
> at 
> quarks.tests.connectors.wsclient.javax.websocket.KeystorePath.ggetStorePath(KeystorePath.java:22)
> at 
> quarks.tests.connectors.wsclient.javax.websocket.WebSoocketServerEcho.getStorePath(WebSocketServerEcho.java:132)
> at 
> quarks.tests.connectors.wsclient.javax.websocket.WebSocketServerEcho.createServer(WebSocketServerEcho.java::107)
> at 
> quarks.tests.connectors.wsclient.javax.websocket.WebSocketServerEcho.start(WebSocketServerEcho.java:70)
> att 
> quarks.tests.connectors.wsclient.javax.websocket.WebSocketClientTest.startEchoer(WebSocketClientTest.java:62)
> I think that the problem is with backslashes in my path when we pass through 
> this code  KeyStorePath.getStorePath(), it ends up truncating the path.
> public class KeystorePath {
>     
>     public static String getStorePath(String storeLeaf) {
>         String path = System.getProperty("user.dir");
>         // Under eclipse/junit: path to project in repo: <repo>/connectors
>         // Under ant/junit: 
> <repo>/connectors/<project>/unittests/testrunxxxxxxx
>         if (!path.endsWith("/connectors")) {   
>             int indx = path.indexOf("/connectors/");
>             indx += "/connectors/".length() - 1;
>             path = path.substring(0, indx);
>         }
>         path += "/wsclient-javax.websocket/src/test/keystores/" + storeLeaf;
>         if (!new File(path).exists())
>             throw new IllegalArgumentException("File does not exist: "+path);
>         return path;
>     }
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to