Repository: beam
Updated Branches:
  refs/heads/master d565f12ed -> 9fb4fc317


Do not send on_success_matcher to remote executors


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

Branch: refs/heads/master
Commit: bd57ff5716f8c17b50ff5448896bf3ec624311ee
Parents: d565f12
Author: Ahmet Altay <[email protected]>
Authored: Wed Apr 5 14:25:45 2017 -0700
Committer: Ahmet Altay <[email protected]>
Committed: Wed Apr 5 14:39:59 2017 -0700

----------------------------------------------------------------------
 .../runners/dataflow/test_dataflow_runner.py            | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/bd57ff57/sdks/python/apache_beam/runners/dataflow/test_dataflow_runner.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/runners/dataflow/test_dataflow_runner.py 
b/sdks/python/apache_beam/runners/dataflow/test_dataflow_runner.py
index 9ca3db1..aca291a 100644
--- a/sdks/python/apache_beam/runners/dataflow/test_dataflow_runner.py
+++ b/sdks/python/apache_beam/runners/dataflow/test_dataflow_runner.py
@@ -29,12 +29,18 @@ class TestDataflowRunner(DataflowRunner):
 
   def run(self, pipeline):
     """Execute test pipeline and verify test matcher"""
+    options = pipeline.options.view_as(TestOptions)
+    on_success_matcher = options.on_success_matcher
+
+    # [BEAM-1889] Do not send this to remote workers also, there is no need to
+    # send this option to remote executors.
+    options.on_success_matcher = None
+
     self.result = super(TestDataflowRunner, self).run(pipeline)
     self.result.wait_until_finish()
 
-    options = pipeline.options.view_as(TestOptions)
-    if options.on_success_matcher:
+    if on_success_matcher:
       from hamcrest import assert_that as hc_assert_that
-      hc_assert_that(self.result, pickler.loads(options.on_success_matcher))
+      hc_assert_that(self.result, pickler.loads(on_success_matcher))
 
     return self.result

Reply via email to