lukecwik commented on a change in pull request #10892: [BEAM-8335] Make 
TestStream to/from runner_api include the output_tags property.
URL: https://github.com/apache/beam/pull/10892#discussion_r384699533
 
 

 ##########
 File path: sdks/python/apache_beam/testing/test_stream.py
 ##########
 @@ -133,15 +140,17 @@ def __eq__(self, other):
     return self.new_watermark == other.new_watermark and self.tag == other.tag
 
   def __hash__(self):
-    return hash(self.new_watermark)
+    return hash(str(self.new_watermark) + str(self.tag))
 
   def __lt__(self, other):
     return self.new_watermark < other.new_watermark
 
   def to_runner_api(self, unused_element_coder):
+    tag = 'None' if self.tag is None else self.tag
     return beam_runner_api_pb2.TestStreamPayload.Event(
         watermark_event=beam_runner_api_pb2.TestStreamPayload.Event.
-        AdvanceWatermark(new_watermark=self.new_watermark.micros // 1000))
+        AdvanceWatermark(
+            new_watermark=self.new_watermark.micros // 1000, tag=tag))
 
 Review comment:
   This should be done for ProcessingTimeEvent as well

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to