mockito behaves strange in multiple thread test

62 views
Skip to first unread message

王海航

unread,
Feb 2, 2023, 8:21:36 AM2/2/23
to mockito
Hey,
I'm running a scheduler implemented by multiple threads test , and using mockito to mock some task. Mockito complains that some of my task methods are not executed.But the scheduler log says those methods were executed.And when i put Thread.Sleep between my scheduler and mockito's verify methods, things become normal. It really seems like a mockito bug.
The detailed description is listed in github issues:https://github.com/mockito/mockito/issues/2896
I'm really curious about whether it's my fault or a bug.I'm happy to be contacted!
Best wish for you all!

Reply all
Reply to author
Forward
0 new messages