beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhalp...@apache.org
Subject [3/5] beam git commit: [BEAM-59] Core tests: stop using gs:// paths
Date Tue, 02 May 2017 05:44:06 GMT
[BEAM-59] Core tests: stop using gs:// paths

Local filesystem is just as good an example, and in the
future these may break because GCS filesystem is not present
in sdks/java/core.


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/e83e5626
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/e83e5626
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/e83e5626

Branch: refs/heads/master
Commit: e83e56264d4862d9cfe499f865cd49c24accb02a
Parents: 87cf88a
Author: Dan Halperin <dhalperi@google.com>
Authored: Mon May 1 18:43:23 2017 -0700
Committer: Dan Halperin <dhalperi@google.com>
Committed: Mon May 1 22:43:54 2017 -0700

----------------------------------------------------------------------
 .../test/java/org/apache/beam/sdk/io/AvroIOTest.java    | 12 ++++++------
 .../test/java/org/apache/beam/sdk/io/TextIOTest.java    |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/e83e5626/sdks/java/core/src/test/java/org/apache/beam/sdk/io/AvroIOTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/AvroIOTest.java b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/AvroIOTest.java
index d14d9b2..790555a 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/AvroIOTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/AvroIOTest.java
@@ -102,8 +102,8 @@ public class AvroIOTest {
 
   @Test
   public void testAvroIOGetName() {
-    assertEquals("AvroIO.Read", AvroIO.read(String.class).from("gs://bucket/foo*/baz").getName());
-    assertEquals("AvroIO.Write", AvroIO.write(String.class).to("gs://bucket/foo/baz").getName());
+    assertEquals("AvroIO.Read", AvroIO.read(String.class).from("/tmp/foo*/baz").getName());
+    assertEquals("AvroIO.Write", AvroIO.write(String.class).to("/tmp/foo/baz").getName());
   }
 
   @DefaultCoder(AvroCoder.class)
@@ -403,14 +403,14 @@ public class AvroIOTest {
   @Test
   public void testWriteWithDefaultCodec() throws Exception {
     AvroIO.Write<String> write = AvroIO.write(String.class)
-        .to("gs://bucket/foo/baz");
+        .to("/tmp/foo/baz");
     assertEquals(CodecFactory.deflateCodec(6).toString(), write.getCodec().toString());
   }
 
   @Test
   public void testWriteWithCustomCodec() throws Exception {
     AvroIO.Write<String> write = AvroIO.write(String.class)
-        .to("gs://bucket/foo/baz")
+        .to("/tmp/foo/baz")
         .withCodec(CodecFactory.snappyCodec());
     assertEquals(SNAPPY_CODEC, write.getCodec().toString());
   }
@@ -419,7 +419,7 @@ public class AvroIOTest {
   @SuppressWarnings("unchecked")
   public void testWriteWithSerDeCustomDeflateCodec() throws Exception {
     AvroIO.Write<String> write = AvroIO.write(String.class)
-        .to("gs://bucket/foo/baz")
+        .to("/tmp/foo/baz")
         .withCodec(CodecFactory.deflateCodec(9));
 
     assertEquals(
@@ -431,7 +431,7 @@ public class AvroIOTest {
   @SuppressWarnings("unchecked")
   public void testWriteWithSerDeCustomXZCodec() throws Exception {
     AvroIO.Write<String> write = AvroIO.write(String.class)
-        .to("gs://bucket/foo/baz")
+        .to("/tmp/foo/baz")
         .withCodec(CodecFactory.xzCodec(9));
 
     assertEquals(

http://git-wip-us.apache.org/repos/asf/beam/blob/e83e5626/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOTest.java b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOTest.java
index 432b801..2ba1797 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOTest.java
@@ -578,9 +578,9 @@ public class TextIOTest {
 
   @Test
   public void testCompressionTypeIsSet() throws Exception {
-    TextIO.Read.Bound read = TextIO.Read.from("gs://bucket/test");
+    TextIO.Read.Bound read = TextIO.Read.from("/tmp/test");
     assertEquals(AUTO, read.getCompressionType());
-    read = TextIO.Read.from("gs://bucket/test").withCompressionType(GZIP);
+    read = TextIO.Read.from("/tmp/test").withCompressionType(GZIP);
     assertEquals(GZIP, read.getCompressionType());
   }
 


Mime
View raw message