diff --git a/test/test_helper.exs b/test/test_helper.exs index 28b49029a39e..c9006141c2cf 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -22,6 +22,18 @@ end default_exclude = [:slow, :minio, :migrations] +# warm up ConCache until https://github.com/sasa1977/con_cache/pull/79 +:code.ensure_loaded(ConCache.Lock.Resource) + +for i <- 1..(System.schedulers_online() * 2) do + Plausible.Cache.Adapter.with_lock( + :sessions, + {i, i + 1}, + 500, + fn -> :warmup end + ) +end + if Mix.env() == :ce_test do IO.puts("Test mode: Community Edition") ExUnit.configure(exclude: [:ee_only | default_exclude])