-
Notifications
You must be signed in to change notification settings - Fork 125
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
Provide the means to customize the folder containing the java executable for RJR #687
Conversation
used to launch the JuT instead of delegating always to JAVA_HOME.
Coherent test issue, I will fix it |
/** | ||
* Allows to specify an alternate, not the one specified in JAVA_HOME, folder containing the JVM to use to launch the instance | ||
*/ | ||
public RealJenkinsRule withAltJavaHome(String altJavaHome) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is alt needed here? withJavaHome
seems fine to me, and then the docs could be simplified I think.
(non blocking)
public RealJenkinsRule withAltJavaHome(String altJavaHome) { | |
public RealJenkinsRule withJavaHome(String altJavaHome) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me is an alternative one given the code assumes there is a default java home to use... However I understand is a matter so if there is other person (so 2 to 1) who wants to change I will
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
withJavaHome
seems more natural to me as well, with a mention that it defaults to java.home
sysprop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I get this merged, please? It seems no more feedback is coming and this is already approved |
Can be used to launch the JuT using any JVM instead of always delegating to JAVA_HOME.
Useful due to the upcoming support process for different JVM versions as it would allow to create RJR test configurations that share the same code but run with different JVMs, like 17 and 21
Testing done
Manual tested by creating a test that uses a custom location on my local system.
There are unit tests that ensures the new code works as expected also.
Submitter checklist