Skip to content

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

Avoid slowdowns in tests due to code server waits (#5674)

Adam Rutkowskiecfea36bd949
diff --git a/test/test_helper.exs b/test/test_helper.exs
index e9745d64c6..8f7a58d08c 100644
--- a/test/test_helper.exs
+++ b/test/test_helper.exs
@@ -23,8 +23,12 @@ end
default_exclude = [:slow, :minio, :migrations]
-# avoid slowdowns contacting the code server https://github.com/sasa1977/con_cache/pull/79
-:code.ensure_loaded(ConCache.Lock.Resource)
+# avoid slowdowns contacting the code server
+for {app, _, _} <- Application.loaded_applications() do
+ if modules = Application.spec(app, :modules) do
+ Code.ensure_all_loaded(modules)
+ end
+end
if Mix.env() == :ce_test do
IO.puts("Test mode: Community Edition")