Skip to content

Commit

Permalink
Warm up ConCache before tests (#4587)
Browse files Browse the repository at this point in the history
  • Loading branch information
aerosol authored Sep 17, 2024
1 parent dd1313f commit f645a9b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit f645a9b

Please sign in to comment.