beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [1/2] incubator-beam git commit: Run Pipelines in tests that expect them
Date Wed, 22 Jun 2016 04:38:38 GMT
Repository: incubator-beam
Updated Branches:
  refs/heads/master e255cd6be -> 741ef266f


Run Pipelines in tests that expect them


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

Branch: refs/heads/master
Commit: 916bf3a84776c45f679bc27dfbaa6e7eec205ef7
Parents: 69a4141
Author: Thomas Groh <tgroh@google.com>
Authored: Fri Jun 17 16:06:37 2016 -0700
Committer: Thomas Groh <tgroh@google.com>
Committed: Fri Jun 17 16:07:39 2016 -0700

----------------------------------------------------------------------
 .../org/apache/beam/sdk/coders/SerializableCoderTest.java    | 5 +++++
 .../test/java/org/apache/beam/sdk/transforms/CreateTest.java | 4 ++++
 .../java/org/apache/beam/sdk/util/GatherAllPanesTest.java    | 8 ++++++++
 3 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/916bf3a8/sdks/java/core/src/test/java/org/apache/beam/sdk/coders/SerializableCoderTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/coders/SerializableCoderTest.java
b/sdks/java/core/src/test/java/org/apache/beam/sdk/coders/SerializableCoderTest.java
index 98c4d6f..f79f243 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/coders/SerializableCoderTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/coders/SerializableCoderTest.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertNull;
 
 import org.apache.beam.sdk.Pipeline;
 import org.apache.beam.sdk.testing.CoderProperties;
+import org.apache.beam.sdk.testing.NeedsRunner;
 import org.apache.beam.sdk.testing.PAssert;
 import org.apache.beam.sdk.testing.TestPipeline;
 import org.apache.beam.sdk.transforms.Create;
@@ -35,6 +36,7 @@ import org.apache.beam.sdk.values.PCollection;
 import org.hamcrest.Matchers;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
@@ -128,6 +130,7 @@ public class SerializableCoderTest implements Serializable {
   }
 
   @Test
+  @Category(NeedsRunner.class)
   public void testDefaultCoder() throws Exception {
     Pipeline p = TestPipeline.create();
 
@@ -141,6 +144,8 @@ public class SerializableCoderTest implements Serializable {
 
     PAssert.that(output)
         .containsInAnyOrder("Hello", "World");
+
+    p.run();
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/916bf3a8/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/CreateTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/CreateTest.java b/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/CreateTest.java
index e491fea..07ba002 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/CreateTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/CreateTest.java
@@ -40,6 +40,7 @@ import org.apache.beam.sdk.coders.VoidCoder;
 import org.apache.beam.sdk.io.BoundedSource;
 import org.apache.beam.sdk.options.PipelineOptions;
 import org.apache.beam.sdk.options.PipelineOptionsFactory;
+import org.apache.beam.sdk.testing.NeedsRunner;
 import org.apache.beam.sdk.testing.PAssert;
 import org.apache.beam.sdk.testing.RunnableOnService;
 import org.apache.beam.sdk.testing.SourceTestUtils;
@@ -151,6 +152,7 @@ public class CreateTest {
   }
 
   @Test
+  @Category(NeedsRunner.class)
   public void testCreateParameterizedType() throws Exception {
     Pipeline p = TestPipeline.create();
 
@@ -163,6 +165,8 @@ public class CreateTest {
         .containsInAnyOrder(
             TimestampedValue.of("a", new Instant(0)),
             TimestampedValue.of("b", new Instant(0)));
+
+    p.run();
   }
   /**
    * An unserializable class to demonstrate encoding of elements.

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/916bf3a8/sdks/java/core/src/test/java/org/apache/beam/sdk/util/GatherAllPanesTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/util/GatherAllPanesTest.java
b/sdks/java/core/src/test/java/org/apache/beam/sdk/util/GatherAllPanesTest.java
index 553d589..e9be41e 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/util/GatherAllPanesTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/util/GatherAllPanesTest.java
@@ -20,6 +20,7 @@ package org.apache.beam.sdk.util;
 import static org.junit.Assert.fail;
 
 import org.apache.beam.sdk.io.CountingInput;
+import org.apache.beam.sdk.testing.NeedsRunner;
 import org.apache.beam.sdk.testing.PAssert;
 import org.apache.beam.sdk.testing.TestPipeline;
 import org.apache.beam.sdk.transforms.GroupByKey;
@@ -39,6 +40,7 @@ import com.google.common.collect.Iterables;
 import org.joda.time.Duration;
 import org.joda.time.Instant;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
@@ -50,6 +52,7 @@ import java.io.Serializable;
 @RunWith(JUnit4.class)
 public class GatherAllPanesTest implements Serializable {
   @Test
+  @Category(NeedsRunner.class)
   public void singlePaneSingleReifiedPane() {
     TestPipeline p = TestPipeline.create();
     PCollection<Iterable<WindowedValue<Iterable<Long>>>> accumulatedPanes
=
@@ -86,9 +89,12 @@ public class GatherAllPanesTest implements Serializable {
                 return null;
               }
             });
+
+    p.run();
   }
 
   @Test
+  @Category(NeedsRunner.class)
   public void multiplePanesMultipleReifiedPane() {
     TestPipeline p = TestPipeline.create();
 
@@ -128,5 +134,7 @@ public class GatherAllPanesTest implements Serializable {
                 return null;
               }
             });
+
+    p.run();
   }
 }


Mime
View raw message