jjh42 / mock

Mocking library for Elixir language
MIT License
654 stars 81 forks source link

Problem with mock function #136

Closed DarkCobalt closed 2 years ago

DarkCobalt commented 2 years ago

I have problem on local machine when run test on my mock function. Only few(2 test) test have this error

** (exit) exited in: :gen_server.call(App.Message_meck, {:set_expect, {{:publish, 1}, [{{:args_matcher, [:_], #Reference<0.2052739551.2509897729.77644>, false}, {:meck_exec, #Function<1.105213587/1 in App.MessageTest.__ex_unit_setup_1/1>}}]}}) ** (EXIT) normal

Other test with mock works good.

When start test on my server all test works.

Where could the problem be?

DarkCobalt commented 2 years ago

I solve problem

defmodule App.MessageTest do
  use App.DataCase, async: true
 end

change to

defmodule App.MessageTest do
  use App.DataCase, async: false
 end

Problem disappeared.