You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/03 20:41:40 UTC

[GitHub] [beam] robertwb commented on a change in pull request #11005: [BEAM-8335] Modify the StreamingCache to subclass the CacheManager

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

 ##########
 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:
   We shouldn't be changing the API of TestClock. If the caller needs a float, convert it there. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services