-
Notifications
You must be signed in to change notification settings - Fork 46
Docs. Troubleshooting test run configuration with Java 17 #2047
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
Comments
@alisevych Please check the Troubleshooting section in Wiki. |
I would correct the following wording not to mess the user:
Also the keys in the first part can be joined into one String so that it can be easily copy-pasted. |
@alisevych Please verify the fix. |
We've just identified that adding VM options to Run configuration doesn't work for Gradle run configuration in IDEA. In case of Gradle project with JDK 17 and a test that uses reflection, the user needs to configure the task that runs this test. Text to insert:
|
The list of modules to open can be different. For example, in OwnerControllerTest in spring-petclinic, there is setFiled called for java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.util.LinkedHashMap$Entry
java.util.LinkedHashMap.head accessible: module java.base does not "opens java.util" to unnamed module ... So the following string should be added to VM options: |
Uh oh!
There was an error while loading. Please reload this page.
Description
Add Troubleshooting section in User guide on how to run tests with Java 17 using reflection.
In order to support user with bug
Please consider the best place for Troubleshooting section.
Expected behavior
UnitTestBot sometimes cannot combine Object assemble model without using reflection.
Sometimes a private field needs to be set or got.
Reflection methods using setAccessible is forbidden in Java 17+.
User can add keys to the JVm in order to run the tests.
Otherwise UtUtils methods can fail.
Environment
IntelliJ IDEA Ultimate 2023.3.*
Potential alternatives
Possibility to add needed keys automatically can be very complex.
One can see the list of keys needed to run tests for UnitTestBot: build.gradle.kts
Context
UnitTestBot plugin will be working on Java 17 starting from Release 2023.3
The text was updated successfully, but these errors were encountered: