Skip to content

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

Fix flaky test (#6539)

Adam Rutkowski91fb504aa63f
diff --git a/test/plausible/ssrf_test.exs b/test/plausible/ssrf_test.exs
index 60a997822e..e86fa8c6b8 100644
--- a/test/plausible/ssrf_test.exs
+++ b/test/plausible/ssrf_test.exs
@@ -192,7 +192,7 @@ defmodule Plausible.SSRFTest do
pool_max_idle_time: 50
)
- assert_receive :pool_reaped
+ assert_receive :pool_reaped, 2000
end
end
end
diff --git a/test/support/dns.ex b/test/support/dns.ex
index 2ff0dced1d..3ea1cdc5e7 100644
--- a/test/support/dns.ex
+++ b/test/support/dns.ex
@@ -35,15 +35,6 @@ defmodule Plausible.Test.Support.DNS do
def expect_no_dns_lookup do
expect(Plausible.DnsLookup.Mock, :lookup, 0, fn _, _, _, _, _ -> [] end)
end
-
- def stub_lookup_a_records(domain, a_records \\ [{192, 168, 1, 1}]) do
- lookup_domain = to_charlist(domain)
-
- Plausible.DnsLookup.Mock
- |> expect(:lookup, fn ^lookup_domain, _type, _record, _opts, _timeout ->
- a_records
- end)
- end
end
end
end