Tests: Reset all cachex caches between synchronous tests
[akkoma] / test / support / conn_case.ex
index 47cb65a80ba102febe685a2226c0f4153031be24..b5bd71809a195089fc1fbc098721154d83733346 100644 (file)
@@ -116,12 +116,11 @@ defmodule Pleroma.Web.ConnCase do
   end
 
   setup tags do
-    Cachex.clear(:user_cache)
-    Cachex.clear(:object_cache)
     :ok = Ecto.Adapters.SQL.Sandbox.checkout(Pleroma.Repo)
 
     unless tags[:async] do
       Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, {:shared, self()})
+      Pleroma.DataCase.clear_cachex()
     end
 
     if tags[:needs_streamer] do