Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D80F719C3C for ; Mon, 25 Apr 2016 19:59:13 +0000 (UTC) Received: (qmail 87223 invoked by uid 500); 25 Apr 2016 19:59:13 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 87125 invoked by uid 500); 25 Apr 2016 19:59:13 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 87044 invoked by uid 500); 25 Apr 2016 19:59:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 87031 invoked by uid 99); 25 Apr 2016 19:59:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Apr 2016 19:59:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3BBC82C1F60 for ; Mon, 25 Apr 2016 19:59:13 +0000 (UTC) Date: Mon, 25 Apr 2016 19:59:13 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9352) Test fails in Widows as the file separator "/" is different from "\" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9352?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15256932#comment-15256932 ]=20 ASF subversion and git services commented on CLOUDSTACK-9352: ------------------------------------------------------------- Commit a6bae2b9c200cff725fbdabddab6c69a94811561 in cloudstack's branch refs= /heads/master from [~williamstevens@gmail.com] [ https://git-wip-us.apache.org/repos/asf?p=3Dcloudstack.git;h=3Da6bae2b ] Merge pull request #1498 from GabrielBrascher/lrg-cs-hackday-038 CLOUDSTACK-9352: Test fails in Widows as the file separator "/" is differen= t 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 t= ested method uses the *File.separator* (that depends from the OS), in windo= ws systems the tested method (*com.cloud.utils.SwiftUtil.splitSwiftPath(Str= ing)*) looks for a "\", as the string does not contain "\" it returns an em= pty string and consequently results in a test failure. **Solution:** Create a string `String input =3D "container" + File.separator + "object";`= , with that the test will validate the tested method verifying if the metho= d splits the string around matches of the given regular expression (in this= case *File.separator*). *JIRA link: https://issues.apache.org/jira/browse/CLOUDSTACK-9352* * pr/1498: Test fails in Widows as the file separator "/" is different from "\" Signed-off-by: Will Stevens > Test fails in Widows as the file separator "/" is different from "\" > -------------------------------------------------------------------- > > Key: CLOUDSTACK-9352 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-935= 2 > Project: CloudStack > Issue Type: Test > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Reporter: Gabriel Beims Br=C3=A4scher > Priority: Minor > > Test com.cloud.utils.SwiftUtilTest.testSplitSwiftPath() fails in Widows a= s the file separator "/" is different from "\" > Problem: > File separator in windows ("\") is different from the expected in the tes= t ("/"); 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 t= ested 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 s= tring and consequently results in a test failure. > Solution: > Create a string String input =3D "container" + File.separator + "obje= ct"; (before it was String input =3D "container/object";); thus, independen= t 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)