You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every now and then, meck:unload/0 crashes with not_mocked for me. It seems to be a race condition: unload/0 passes everything in registered() that locks like a mock to unload_if_mocked, but if the mock module has already been unloaded at that point (due to having been mocked by a now dead process), a not_mocked error is raised and the remaining modules are not unmocked.
I could reproduce it with this Proper property (because it runs the test enough times to make the race condition more likely):
Every now and then,
meck:unload/0
crashes withnot_mocked
for me. It seems to be a race condition:unload/0
passes everything inregistered()
that locks like a mock tounload_if_mocked
, but if the mock module has already been unloaded at that point (due to having been mocked by a now dead process), anot_mocked
error is raised and the remaining modules are not unmocked.I could reproduce it with this Proper property (because it runs the test enough times to make the race condition more likely):
Failure looks like this:
This patch seems to fix the problem:
The text was updated successfully, but these errors were encountered: