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
In this case MockitoTestNGListener will not work as we want.
In current implementation MockitoSession is bind to current test instance, but TestNG create one test instance and run test in multiple thread.
Issue need more investigate how to resolve problem.
We must to check and discover how mocked field should be distinguished on one test instance and multiple thread.
Please like / react on issue to we see how many people are interested this issue.
The text was updated successfully, but these errors were encountered:
I strongly guess it throws ConcurrentModificationExceptions because of the usage of HashMaps instead of ConcurrentHashMaps in the MockitoTestNGListener class. The (not thread safe) handling of the fixtures seems to be a problem in the framework and related to the referenced issue. But at least the listener itself could be thread safe with changing the Map implementation and make life a bit easier :)
We can annotate test with:
In this case
MockitoTestNGListener
will not work as we want.In current implementation
MockitoSession
is bind to current test instance, butTestNG
create one test instance and run test in multiple thread.Issue need more investigate how to resolve problem.
We must to check and discover how mocked field should be distinguished on one test instance and multiple thread.
Please like / react on issue to we see how many people are interested this issue.
The text was updated successfully, but these errors were encountered: