Skip to content

Commit

Permalink
ci: fix flaky tracer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brettlangdon committed Aug 28, 2024
1 parent a909be0 commit 437ca1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/tracer/test_rate_limiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ def test_rate_limiter_effective_rate_starting_rate(time_window):
assert limiter.current_window_ns == (now_ns + time_window)
assert limiter.prev_window_rate == 0.5

# Gap of 1.9999 seconds, same window
time_ns = now_ns + (1.9999 * time_window)
# Gap of 1.85 seconds, same window
time_ns = now_ns + (1.85 * time_window)
with mock.patch("ddtrace.internal.rate_limiter.compat.monotonic_ns", return_value=time_ns):
assert limiter.is_allowed() is False
assert limiter.effective_rate == 0.5
Expand Down

0 comments on commit 437ca1d

Please sign in to comment.