-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting meck_proc already started errors #217
Comments
Not sure how to reproduce this. What project are you building and how? |
The project is private. However we have noticed that it doesn't always happen (only sometimes perhaps due to some race conditions) and only happens with cover even though we are doing teardown of that module's meck properly using meck:unload() every single time. |
Are you running tests in parallel? This error occurs when there's already a mock started for the module. Alternatively, perhaps you have a cleanup that doesn't always run properly? |
Not specifying any execution order and letting eunit decide everything. Have my cleanup (meck:unload()) in a try catch after block ... so as long as the cleanup function executes, I think meck:unload() should be always called. Not sure how cover sometimes interacts with all of this in a funny way. |
Sounds like a race condition somehow (asynchronous teardown of a mock at the same time as a set up). Does the error happen if you run individual test cases in isolation? |
have noticed this while running the individual test as well |
Getting this issue when running just one test sounds really weird, especially if you never called |
Expected behavior
make eunit/junit COVER=1 should pass post OTP 23
Observed behavior
Getting these kinds of errors (with COVER=1) for some unknown reasons that were not coming before OTP 23
::in function meck_proc:start/2 (src/meck_proc.erl, line 93) called as start(put_functions,[passthrough]) **error:{already_started,<0.16752.0>}
This only happens with COVER=1 and succeeds when COVER=1 is not specified
Versions
OS: Debian Buster
Erlang OTP 23.1.1 installed(compiled) via. kerl
The text was updated successfully, but these errors were encountered: