Skip to content

Commit

Permalink
story timestamps can be slightly in the future (#5612)
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Dec 17, 2021
1 parent 3494c2b commit fa326d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions distributed/utils_test.py
Expand Up @@ -1821,8 +1821,10 @@ def assert_worker_story(
assert isinstance(ev, tuple)
assert isinstance(ev[-2], str) and ev[-2] # stimulus_id
assert isinstance(ev[-1], float) # timestamp
assert prev_ts <= ev[-1] # timestamps are monotonic ascending
assert now - 3600 < ev[-1] <= now # timestamps are within the last hour
assert prev_ts <= ev[-1] # Timestamps are monotonic ascending
# Timestamps are within the last hour. It's been observed that a timestamp
# generated in a Nanny process can be a few milliseconds in the future.
assert now - 3600 < ev[-1] <= now + 1
prev_ts = ev[-1]
except AssertionError:
raise AssertionError(
Expand Down

0 comments on commit fa326d5

Please sign in to comment.