Closed GoogleCodeExporter closed 9 years ago
If think you are misusing the API. The sample code does not really say what
does your code actually look like, it doesn't look like you are using the API
in a correct way.
However I would recommend you to first prepare all the stubbing before passing
mocks to different threads.
Also you should have asked us on the mailing list, instead of reporting a bug
here.
Original comment by brice.du...@gmail.com
on 12 Dec 2011 at 1:36
Original comment by brice.du...@gmail.com
on 9 Mar 2012 at 11:04
Take a look at the FAQ. Stubbing or verifying concurrently does not make sense
because it always lead to random results. Also, the mockito API cannot
guarantee thread safety for stubbing and verification because of they way the
DSL is designed.
As Brice mentions: feel free to use mocks concurrently, however prepare (stub)
them *before* the concurrency starts.
Hope that helps!
Original comment by szcze...@gmail.com
on 11 Mar 2012 at 7:59
Original issue reported on code.google.com by
mason....@gmail.com
on 12 Dec 2011 at 12:31Attachments: