-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Mocks leak across tests #111
Comments
nice catch and thanks for reporting. I would also favour #92 as a solution rather than going back to the |
I got bit by this too, but was confused because I did have a mock in both tests:
Tiny typo though! |
I think this should be fixed in https://github.com/lipanski/mockito/releases/tag/0.32.0 |
I had one test which setup a few mocks. I then started writing a second test which used some of the same endpoints
When I ran the tests, I expected them to fail (and was going to use the error messages to help setup the required mocks), but to my surprise they passed. If I use
--test-threads=1
things work as expectedI think this is a side-effect of #35 - the tests will only be made single-threaded if they create mocks - which didn't work in my case as the second test did not (yet) have any mock calls
I suspect there isn't a simple solution to this; more likely only a structural change like #92 would prevent this
Repro case:
The text was updated successfully, but these errors were encountered: