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: Fix tests marked RunnableOnService that aren't
Date Tue, 05 Apr 2016 20:16:08 GMT
Repository: incubator-beam
Updated Branches:
  refs/heads/master f2f5129e2 -> 2b5544531


Fix tests marked RunnableOnService that aren't

Tests that are RunnableOnService should only test parts of the model
that are shared between all runners (e.g. PipelineResult, the contents
of a PCollection).

RunnableOnService tests that expect a specific exception as a result of
the pipeline failing are not portable. Remove the RunnableOnService
category from DoFnTest, DoFnWithContextTest, and WithTimestampTest tests
which expect exceptions.


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

Branch: refs/heads/master
Commit: 2cfc3e44d1fb44f454b267e468129257d73130d4
Parents: f2f5129
Author: Thomas Groh <tgroh@google.com>
Authored: Tue Apr 5 12:35:10 2016 -0700
Committer: Davor Bonaci <davor@google.com>
Committed: Tue Apr 5 13:15:06 2016 -0700

----------------------------------------------------------------------
 .../java/com/google/cloud/dataflow/sdk/transforms/DoFnTest.java | 5 -----
 .../cloud/dataflow/sdk/transforms/DoFnWithContextTest.java      | 5 -----
 .../cloud/dataflow/sdk/transforms/WithTimestampsTest.java       | 1 -
 3 files changed, 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/2cfc3e44/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnTest.java
b/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnTest.java
index 09886c7..9de7ce7 100644
--- a/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnTest.java
+++ b/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnTest.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertThat;
 
 import com.google.cloud.dataflow.sdk.Pipeline.PipelineExecutionException;
-import com.google.cloud.dataflow.sdk.testing.RunnableOnService;
 import com.google.cloud.dataflow.sdk.testing.TestPipeline;
 import com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn;
 import com.google.cloud.dataflow.sdk.transforms.Max.MaxIntegerFn;
@@ -32,7 +31,6 @@ import com.google.cloud.dataflow.sdk.transforms.display.DisplayData;
 
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
@@ -129,7 +127,6 @@ public class DoFnTest implements Serializable {
   }
 
   @Test
-  @Category(RunnableOnService.class)
   public void testCreateAggregatorInStartBundleThrows() {
     TestPipeline p = createTestPipeline(new DoFn<String, String>() {
       @Override
@@ -148,7 +145,6 @@ public class DoFnTest implements Serializable {
   }
 
   @Test
-  @Category(RunnableOnService.class)
   public void testCreateAggregatorInProcessElementThrows() {
     TestPipeline p = createTestPipeline(new DoFn<String, String>() {
       @Override
@@ -164,7 +160,6 @@ public class DoFnTest implements Serializable {
   }
 
   @Test
-  @Category(RunnableOnService.class)
   public void testCreateAggregatorInFinishBundleThrows() {
     TestPipeline p = createTestPipeline(new DoFn<String, String>() {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/2cfc3e44/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnWithContextTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnWithContextTest.java
b/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnWithContextTest.java
index 5a63171..488bcfc 100644
--- a/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnWithContextTest.java
+++ b/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/DoFnWithContextTest.java
@@ -26,14 +26,12 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.cloud.dataflow.sdk.Pipeline.PipelineExecutionException;
-import com.google.cloud.dataflow.sdk.testing.RunnableOnService;
 import com.google.cloud.dataflow.sdk.testing.TestPipeline;
 import com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn;
 import com.google.cloud.dataflow.sdk.transforms.Max.MaxIntegerFn;
 
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
@@ -160,7 +158,6 @@ public class DoFnWithContextTest implements Serializable {
   }
 
   @Test
-  @Category(RunnableOnService.class)
   public void testCreateAggregatorInStartBundleThrows() {
     TestPipeline p = createTestPipeline(new DoFnWithContext<String, String>() {
       @StartBundle
@@ -179,7 +176,6 @@ public class DoFnWithContextTest implements Serializable {
   }
 
   @Test
-  @Category(RunnableOnService.class)
   public void testCreateAggregatorInProcessElementThrows() {
     TestPipeline p = createTestPipeline(new DoFnWithContext<String, String>() {
       @ProcessElement
@@ -195,7 +191,6 @@ public class DoFnWithContextTest implements Serializable {
   }
 
   @Test
-  @Category(RunnableOnService.class)
   public void testCreateAggregatorInFinishBundleThrows() {
     TestPipeline p = createTestPipeline(new DoFnWithContext<String, String>() {
       @FinishBundle

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/2cfc3e44/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/WithTimestampsTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/WithTimestampsTest.java
b/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/WithTimestampsTest.java
index ca2dd16..54639af 100644
--- a/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/WithTimestampsTest.java
+++ b/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/transforms/WithTimestampsTest.java
@@ -85,7 +85,6 @@ public class WithTimestampsTest implements Serializable {
   }
 
   @Test
-  @Category(RunnableOnService.class)
   public void withTimestampsBackwardsInTimeShouldThrow() {
     TestPipeline p = TestPipeline.create();
 


Mime
View raw message