Closed mitchellwrosen closed 7 years ago
Since I don't know what ejabberd_dekaf_client:start_link/3
does, it's hard to tell what goes wrong here. Would you happen to have any more stack traces available? I suspect the not_mocked
error is thrown from the Meck API (or a call to a mock) from inside your gen_server
somewhere (hence the Generic server ... terminating
message).
Hm. start_link
traps exits, which seems to trigger the error. Here's the whole code:
-module(ejabberd_dekaf_client).
-behavior(gen_server).
start_link(_,_,_) -> gen_server:start_link(?MODULE, {}, []).
init(_) ->
process_flag(trap_exit, true),
{ok, foo}.
Could it be that because you trap exits, the process doesn't die when the test is over and it continues to call the mock (which is gone since the test is over)?
Closing because of inactivity. Please re-open if it is still an issue!
This test is crashing (after succeeding) with:
For some reason, if I shorted the test a bit, it passes:
Thanks for looking.