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

Chetan Mehrotra commented on OAK-3047:
--------------------------------------

[~frm] Looks the issue is with {{load}} method

{noformat}
    private String load(String name) throws Exception {
        return Files.toString(new File(getClass().getResource(name).getFile()), 
Charsets.UTF_8);
    }
{noformat}

With above approach the file url obtained is URL encoded 
_Apache%20Jackrabbit%20Oak%20matrix_ and hence does not work. Probably a safe 
approach would be to use the input stream from the resource and convert it to 
stream. See [patch|^OAK-3047.patch]. Can you review it

> RemoteServerIT test are failing on the CI server
> ------------------------------------------------
>
>                 Key: OAK-3047
>                 URL: https://issues.apache.org/jira/browse/OAK-3047
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: remoting
>            Reporter: Chetan Mehrotra
>            Priority: Minor
>              Labels: CI, Jenkins
>             Fix For: 1.3.2
>
>         Attachments: OAK-3047.patch
>
>
> Most of the test in {{RemoteServerIT}} at times fail on the CI server [1] 
> with following exception
> {noformat}
> Error Message
> /home/jenkins/jenkins-slave/workspace/Apache%20Jackrabbit%20Oak%20matrix/jdk/latest1.7/label/Ubuntu/nsfixtures/SEGMENT_MK/profile/unittesting/oak-remote/target/test-classes/org/apache/jackrabbit/oak/remote/http/handler/addNodeMultiPathProperty.json
>  (No such file or directory)
> Stacktrace
> java.io.FileNotFoundException: 
> /home/jenkins/jenkins-slave/workspace/Apache%20Jackrabbit%20Oak%20matrix/jdk/latest1.7/label/Ubuntu/nsfixtures/SEGMENT_MK/profile/unittesting/oak-remote/target/test-classes/org/apache/jackrabbit/oak/remote/http/handler/addNodeMultiPathProperty.json
>  (No such file or directory)
>       at java.io.FileInputStream.open(Native Method)
>       at java.io.FileInputStream.<init>(FileInputStream.java:146)
>       at com.google.common.io.Files$FileByteSource.openStream(Files.java:127)
>       at com.google.common.io.Files$FileByteSource.openStream(Files.java:117)
>       at 
> com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:404)
>       at com.google.common.io.CharSource.read(CharSource.java:155)
>       at com.google.common.io.Files.toString(Files.java:391)
>       at 
> org.apache.jackrabbit.oak.remote.http.handler.RemoteServerIT.load(RemoteServerIT.java:119)
>       at 
> org.apache.jackrabbit.oak.remote.http.handler.RemoteServerIT.testPatchLastRevisionAddMultiPathProperty(RemoteServerIT.java:1199)
> {noformat}
> [1] 
> https://builds.apache.org/job/Apache%20Jackrabbit%20Oak%20matrix/232/testReport/



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

Reply via email to