beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [1/2] incubator-beam git commit: FileBasedSinkTest: fix tests in Windows OS by using IOChannelUtils.resolve().
Date Tue, 13 Dec 2016 05:23:27 GMT
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 <peihe@google.com>
Authored: Mon Dec 12 17:52:07 2016 -0800
Committer: Davor Bonaci <davor@google.com>
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<String> values = Arrays.asList("sympathetic vulture", "boresome hummingbird");
@@ -488,8 +488,7 @@ public class FileBasedSinkTest {
             .createWriteOperation(null);
     final FileBasedWriter<String> writer =
         writeOp.createWriter(null);
-    final String expectedFilename =
-        writeOp.tempDirectory.get() + "/" + testUid;
+    final String expectedFilename = IOChannelUtils.resolve(writeOp.tempDirectory.get(), testUid);
 
     final List<String> expected = new ArrayList<>();
     expected.add("header");


Mime
View raw message