-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mockito inlining appears to fail on J9/windows but work on J9/mac #3410
Comments
I notice |
The MacOS build isn't ready for production yet (there are no official releases for JDK8) - it may not even be able to load the JIT yet, which might explain differences in behaviour from Windows (not that there are any intentional differences - all JVMTI features should work equally well on all platforms). |
Thanks for the update. I think a fair conclusion would be that mockito inlining is not expected to work with OpenJ9 due to the attempted class modifications that mockito does for stubbing. |
I would expect it to work if Object was not modified. |
@planetf1 We're working to allow Object to be redefined. Can you provide a reproducible test I can run to very the feature? |
I see it as well in the context of R3 Corda to an app similar https://github.com/corda/cordapp-example. There unfortunately I run into a further issue next to Mockito (puniverse/quasar#321). Our app is closed source unfortunately, but if there is something I could try, you could let me know. Hope run into this issue with cordapp-example as well once the other issue is resolved. |
Allow java.lang.Object to be redefined (or retransformed) in fast HCR mode (i.e. runtime HCR, not extended HCR used by the java debugger). Related: eclipse-openj9#3410 [ci skip] Signed-off-by: Graham Chapman <[email protected]>
I should be able to test within a couple of days. Let me know when there is a jdk you'd like me to try with. Thanks |
@DanHeidinga I have the same error in one of my project. I can confirm that the latest nightly OpenJDK8U-jdk_x64_windows_openj9_2019-02-27-11-11.zip works fine and the mockito inline mode does not throw an error. |
Excellent. Glad to hear it's resolved! |
I can confirm I am no longer seeing this either. thanks! |
…ompatibility with IBM JDK 8 (see eclipse-openj9/openj9#3410 and mockito/mockito#801)
I tried building http://github.com/odpi/egeria using the JDK 8 192 J9 SDK from adoptopenjdk on Windows 10. A few of the tests use mockito inline mocking and failed (see log below)
I then tried using JDK 8 192 SDK from adoptopenjdk on MacOS Mojave and it all seemed to work just fine, as indeed does both the oracle jdk on windows, and openjdk/hotspot on windows.
So this looks like an issue with the Windows 10 JDK
I do not know if this is a build issue, or the code.
original discussion was at https://adoptopenjdk.slack.com/archives/C09NLQQAV/p1540215988000100
Error I hit was:
It also looked somewhat similar to mockito/mockito#801
As above - somewhat hard to determine where the responsiblities arise between
However the IMPACT to Java Developers is
Apologies no direct test case yet, but if you could offer some guidance on the best way to proceed I can look at putting a small module together that demonstrates the issue
The text was updated successfully, but these errors were encountered: