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
I recently migrate some projects from Junit 4 to Junit 5 and I now have test failures linked to Jmockit.
My settings:
Jmockit 1.49.4
Open Jdk 11.0.17+8
MyEclipse 2022-1-0a
When I launch the tests via Maven, it works.
When I launch the tests in Eclipse one by one, it works.
When I launch the tests in Eclipse in bulk, it fails.
The issue is linked to the ArgumentCapturing.varIndexToTypeDesc static map.
varIndex is not unique in the Eclipse bulk launch and the value stored in the map, before the test launch, is overrided.
Which is an issue, because during the test execution, in CaptureMatcher.matches(), expectedType.isInstance(argValue) is false and the value is not captured.
I tried to understand what the varIndex variable is .. but I was not able :(
What I understand is that it is not unique when I launch my tests in Eclipse, in bulk, with Junit5.
Let me know if you need more information.
Thanks a lot for supporting that project.
Vincent
The text was updated successfully, but these errors were encountered:
Hello,
I recently migrate some projects from Junit 4 to Junit 5 and I now have test failures linked to Jmockit.
My settings:
When I launch the tests via Maven, it works.
When I launch the tests in Eclipse one by one, it works.
When I launch the tests in Eclipse in bulk, it fails.
The issue is linked to the ArgumentCapturing.varIndexToTypeDesc static map.
varIndex is not unique in the Eclipse bulk launch and the value stored in the map, before the test launch, is overrided.
Which is an issue, because during the test execution, in CaptureMatcher.matches(), expectedType.isInstance(argValue) is false and the value is not captured.
Below is a simple example I made to reproduce the issue.
https://github.com/vgjosse/jmockit-dummy-test
I tried to understand what the varIndex variable is .. but I was not able :(
What I understand is that it is not unique when I launch my tests in Eclipse, in bulk, with Junit5.
Let me know if you need more information.
Thanks a lot for supporting that project.
Vincent
The text was updated successfully, but these errors were encountered: