Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2BF2D200BEA for ; Tue, 13 Dec 2016 06:23:32 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2A6F0160B2A; Tue, 13 Dec 2016 05:23:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 72A70160B22 for ; Tue, 13 Dec 2016 06:23:31 +0100 (CET) Received: (qmail 83832 invoked by uid 500); 13 Dec 2016 05:23:30 -0000 Mailing-List: contact commits-help@beam.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.incubator.apache.org Delivered-To: mailing list commits@beam.incubator.apache.org Received: (qmail 83823 invoked by uid 99); 13 Dec 2016 05:23:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2016 05:23:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 17FC1C079E for ; Tue, 13 Dec 2016 05:23:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id B_BOjXeIumIj for ; Tue, 13 Dec 2016 05:23:29 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 609FC5F5C6 for ; Tue, 13 Dec 2016 05:23:28 +0000 (UTC) Received: (qmail 83806 invoked by uid 99); 13 Dec 2016 05:23:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2016 05:23:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8D363E09B3; Tue, 13 Dec 2016 05:23:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davor@apache.org To: commits@beam.incubator.apache.org Date: Tue, 13 Dec 2016 05:23:27 -0000 Message-Id: <9dc928d6635247638fa35791597e0905@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-beam git commit: FileBasedSinkTest: fix tests in Windows OS by using IOChannelUtils.resolve(). archived-at: Tue, 13 Dec 2016 05:23:32 -0000 Repository: incubator-beam Updated Branches: refs/heads/master f898ff785 -> e776d1d70 FileBasedSinkTest: fix tests in Windows OS by using IOChannelUtils.resolve(). Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/592c4d9f Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/592c4d9f Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/592c4d9f Branch: refs/heads/master Commit: 592c4d9fb9cbca22035e75fdcc77b887d40e86ec Parents: f898ff7 Author: Pei He Authored: Mon Dec 12 17:52:07 2016 -0800 Committer: Davor Bonaci Committed: Mon Dec 12 21:22:47 2016 -0800 ---------------------------------------------------------------------- .../test/java/org/apache/beam/sdk/io/FileBasedSinkTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/592c4d9f/sdks/java/core/src/test/java/org/apache/beam/sdk/io/FileBasedSinkTest.java ---------------------------------------------------------------------- diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/FileBasedSinkTest.java b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/FileBasedSinkTest.java index 930ca29..9f0c424 100644 --- a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/FileBasedSinkTest.java +++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/FileBasedSinkTest.java @@ -51,6 +51,7 @@ import org.apache.beam.sdk.io.FileBasedSink.FileResult; import org.apache.beam.sdk.io.FileBasedSink.WritableByteChannelFactory; import org.apache.beam.sdk.options.PipelineOptions; import org.apache.beam.sdk.options.PipelineOptionsFactory; +import org.apache.beam.sdk.util.IOChannelUtils; import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream; import org.junit.Rule; import org.junit.Test; @@ -88,8 +89,7 @@ public class FileBasedSinkTest { @Test public void testWriter() throws Exception { String testUid = "testId"; - String expectedFilename = - getBaseTempDirectory() + "/" + testUid; + String expectedFilename = IOChannelUtils.resolve(getBaseTempDirectory(), testUid); SimpleSink.SimpleWriter writer = buildWriter(); List values = Arrays.asList("sympathetic vulture", "boresome hummingbird"); @@ -488,8 +488,7 @@ public class FileBasedSinkTest { .createWriteOperation(null); final FileBasedWriter writer = writeOp.createWriter(null); - final String expectedFilename = - writeOp.tempDirectory.get() + "/" + testUid; + final String expectedFilename = IOChannelUtils.resolve(writeOp.tempDirectory.get(), testUid); final List expected = new ArrayList<>(); expected.add("header");