diff options
author | lain <lain@soykaf.club> | 2020-12-26 10:26:35 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-12-26 10:26:35 +0000 |
commit | e4f1d8f48c85b8a388d6c3945db157de5ce588c5 (patch) | |
tree | 3a3da119eb71a0536bd5f23226834dfea634d74a /test/support/channel_case.ex | |
parent | 88530c02d60900d1e0920d50c6c081a59010ea09 (diff) | |
parent | fecefe68f88014ad2f8b5f290f3b0c7692fa3fef (diff) | |
download | pleroma-e4f1d8f48c85b8a388d6c3945db157de5ce588c5.tar.gz pleroma-e4f1d8f48c85b8a388d6c3945db157de5ce588c5.zip |
Merge branch 'cachex-test' into 'develop'
Test framework overhaul (speed, reliability)
See merge request pleroma/pleroma!3209
Diffstat (limited to 'test/support/channel_case.ex')
-rw-r--r-- | test/support/channel_case.ex | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/support/channel_case.ex b/test/support/channel_case.ex index 114184a9f..f4696adb3 100644 --- a/test/support/channel_case.ex +++ b/test/support/channel_case.ex @@ -33,8 +33,14 @@ defmodule Pleroma.Web.ChannelCase do setup tags do :ok = Ecto.Adapters.SQL.Sandbox.checkout(Pleroma.Repo) - unless tags[:async] do + if tags[:async] do + Mox.stub_with(Pleroma.CachexMock, Pleroma.NullCache) + Mox.set_mox_private() + else Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, {:shared, self()}) + Mox.stub_with(Pleroma.CachexMock, Pleroma.CachexProxy) + Mox.set_mox_global() + Pleroma.DataCase.clear_cachex() end :ok |