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
when I switched from Mockito 3.9.0 to 5.1.1, one test scenario started to raise an expcetion (scenario that on 3.1.1 worked fine).
Exception in thread "test-pq" org.mockito.exceptions.base.MockitoException: Caught an unexpected exception while stack walking.
This is unexpected and is likely due to a change in either Java's StackWalker or Reflection APIs.
It's worth trying to upgrade to a newer version of Mockito, or otherwise to file a bug report.
at cz.aimtec.dci.label.PrinterQueue.run(PrinterQueue.java:375)
Unfortunately, Thread is one of the classes that Mockito relies on internally for its behavior. Stubbing Thread will therefore lead to undefined behavior. Additionally, it is advised not to mock classes you don't own: https://github.com/mockito/mockito/wiki/How-to-write-good-tests#dont-mock-a-type-you-dont-own We are working on improving the user experience by working on a DoNotMock feature to avoid mocking classes/methods that are known to crash Mockito internals (#1833). Therefore, I am closing this as "Infeasible". Apologies for the uninformative exception that is thrown.
Hello,
when I switched from Mockito 3.9.0 to 5.1.1, one test scenario started to raise an expcetion (scenario that on 3.1.1 worked fine).
Simplified testing code bellow.
mockito: 5.1.1
jdk: java-11-openjdk-11.0.18.10-1.windows.redhat.x86_64
os: Win 10
mvn: 3.6.3
I will be glad about any information about this issue.
The text was updated successfully, but these errors were encountered: