[ 
https://issues.apache.org/jira/browse/BEAM-6778?focusedWorklogId=215396&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-215396
 ]

ASF GitHub Bot logged work on BEAM-6778:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Mar/19 11:45
            Start Date: 19/Mar/19 11:45
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on pull request #7937: [BEAM-6778] 
Enable Bundle Finalization in Python SDK harness over FnApi
URL: https://github.com/apache/beam/pull/7937#discussion_r266843616
 
 

 ##########
 File path: sdks/python/apache_beam/runners/portability/fn_api_runner_test.py
 ##########
 @@ -801,6 +807,48 @@ def contains_labels(monitoring_info, labels):
       print(res._monitoring_infos_by_stage)
       raise
 
+  def test_duplicated_callbacks(self):
+    event_recorder = EventRecorder(tempfile.gettempdir())
+    event_recorder.record('test')
+    elements_list = ['1', '2']
+
+    class FinalizebleDoFnWithSameRegister(beam.DoFn):
+      def process(
+          self,
+          element,
+          bundle_finalizer=beam.DoFn.BundleFinalizerParam):
+        bundle_finalizer.register(lambda: event_recorder.delete_file())
 
 Review comment:
   Are you trying to test here that a failing finalizer does not fail the 
pipeline? If so, make that explicit via a finializer that raises an exception. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 215396)
    Time Spent: 6h 10m  (was: 6h)

> Enable Bundle Finalization in Python SDK
> ----------------------------------------
>
>                 Key: BEAM-6778
>                 URL: https://issues.apache.org/jira/browse/BEAM-6778
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-py-harness
>            Reporter: Boyuan Zhang
>            Assignee: Boyuan Zhang
>            Priority: Major
>          Time Spent: 6h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to