Fix flaky test: wait till ets is emptied (#3755)

* Fix flaky test: wait till ets is emptied

* fixup
pull/3763/head
hq1 3 years ago committed by GitHub
parent 9ad5ecebc2
commit 6ce4d19931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -21,9 +21,9 @@ defmodule Plausible.RateLimitTest do
assert expires_at >= System.system_time(:millisecond)
assert expires_at <= System.system_time(:millisecond) + 50
:timer.sleep(150)
assert :ets.tab2list(@table) == []
Plausible.TestUtils.eventually(fn ->
{:ets.tab2list(@table) == [], :done}
end)
end
end

Loading…
Cancel
Save