rohdesamuel commented on a change in pull request #11005: [BEAM-8335] Modify 
the StreamingCache to subclass the CacheManager 
URL: https://github.com/apache/beam/pull/11005#discussion_r387883702
 
 

 ##########
 File path: sdks/python/apache_beam/runners/direct/clock.py
 ##########
 @@ -44,11 +46,11 @@ def time(self):
 
 class TestClock(object):
   """Clock used for Testing"""
-  def __init__(self, current_time=0):
-    self._current_time = current_time
+  def __init__(self, current_time=None):
+    self._current_time = current_time if current_time else Timestamp()
 
   def time(self):
-    return self._current_time
+    return float(self._current_time)
 
 Review comment:
   Not changing it, fixing it. The TestClock has the same interface as the 
RealClock and should return the same thing. See the comment on the Clock 
interface.

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