Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix flaky rate_limit test (#3615)

ruslandoga26809bfd2ef7
diff --git a/test/plausible/rate_limit_test.exs b/test/plausible/rate_limit_test.exs
index ba57787da2..e6d137e1b0 100644
--- a/test/plausible/rate_limit_test.exs
+++ b/test/plausible/rate_limit_test.exs
@@ -18,7 +18,7 @@ defmodule Plausible.RateLimitTest do
assert {:allow, 1} = RateLimit.check_rate(@table, key, scale, limit)
assert [{{^key, _bucket}, _count = 1, expires_at}] = :ets.tab2list(@table)
- assert expires_at > System.system_time(:millisecond)
+ assert expires_at >= System.system_time(:millisecond)
assert expires_at <= System.system_time(:millisecond) + 50
:timer.sleep(150)