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

ASF GitHub Bot commented on CLOUDSTACK-9352:
--------------------------------------------

Github user GabrielBrascher commented on the pull request:

    https://github.com/apache/cloudstack/pull/1498#issuecomment-212984070
  
    @swill it succesfully builds in windows: 
[build-result.txt](https://github.com/apache/cloudstack/files/230237/build-result.txt);
    
    Not sure it if helps, but there is also a print showing the test failing, 
after the adjustment the test is ok: 
![testrun](https://cloud.githubusercontent.com/assets/5025148/14715361/edf33914-07be-11e6-89db-b59028a539fe.png)
    
    Let me know if you need more information :)
    



> Test fails in Widows as the file separator "/" is different from "\"
> --------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9352
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9352
>             Project: CloudStack
>          Issue Type: Test
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Gabriel Beims Bräscher
>            Priority: Minor
>
> Test com.cloud.utils.SwiftUtilTest.testSplitSwiftPath() fails in Widows as 
> the file separator "/" is different from "\"
> Problem:
> File separator in windows ("\") is different from the expected in the test 
> ("/"); thus, the test com.cloud.utils.SwiftUtilTest.testSplitSwiftPath() will 
> fail in Windows systems.
> The problem is that the input of the test is "container/object" but the 
> tested method uses the File.separator (that depends on from the OS), in the 
> windows the tested method (com.cloud.utils.SwiftUtil.splitSwiftPath(String)) 
> looks for a "\", as the string does not contain "\" it returns an empty 
> string and consequently results in a test failure.
> Solution:
>     Create a string String input = "container" + File.separator + "object"; 
> (before it was String input = "container/object";); thus, independent of the 
> OS, the test will validate the tested method in a manner that the file 
> separator does not disturb the result;



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

Reply via email to