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
Hey Bruno!
I'm upgrading mockito-scala in my large project from 1.5.18 to 1.13.0 (and scalatest from 3.0.8 to 3.1.1 which is a big change). Scala 2.13.
All the tests in the project derive from org.mockito.scalatest.IdiomaticMockito. After upgrading and fixing all compile errors, when I run all tests, about 700 of them pass, and suddenly, after a certain point, every single test starts failing with this:
[info] org.mockito.exceptions.misusing.UnfinishedMockingSessionException: Unfinished mocking session detected.
[info] Previous MockitoSession was not concluded with 'finishMocking()'.
[info] For examples of correct usage see javadoc for MockitoSession class.
And then obviously whichever of the failed tests I rerun manually, they pass.
Feels like something somewhere sets a static state and doesn't unset it - or perhaps there is a race condition. The project has parallelExecution in Test := false though...
Any ideas what it could be?
Could it be the fact that MockitoSessionFixture doesn't catch exceptions? I haven't been able to figure out the exact trigger for the failures but suspect it can start after a normal test failure.
Just letting you know in case you have ideas, but I'll investigate more.
The text was updated successfully, but these errors were encountered:
Ok, further investigation showed that one of the test suites got aborted because of a StackOverflowError, and that caused all subsequent MockitoScalaSession-based test cases to fail with the error above
Hey Bruno!
I'm upgrading mockito-scala in my large project from 1.5.18 to 1.13.0 (and scalatest from 3.0.8 to 3.1.1 which is a big change). Scala 2.13.
All the tests in the project derive from
org.mockito.scalatest.IdiomaticMockito
. After upgrading and fixing all compile errors, when I run all tests, about 700 of them pass, and suddenly, after a certain point, every single test starts failing with this:And then obviously whichever of the failed tests I rerun manually, they pass.
Feels like something somewhere sets a static state and doesn't unset it - or perhaps there is a race condition. The project has
parallelExecution in Test := false
though...Any ideas what it could be?
Could it be the fact that
MockitoSessionFixture
doesn't catch exceptions? I haven't been able to figure out the exact trigger for the failures but suspect it can start after a normal test failure.Just letting you know in case you have ideas, but I'll investigate more.
The text was updated successfully, but these errors were encountered: