Test fixtures/available java homes throw#36144
Merged
blindpirate merged 1 commit intoJan 20, 2026
Merged
Conversation
Member
|
Thank you for your proposed contribution! This PR has a valid DCO and tests. The relevant team for this area will confirm the design of the implementation choices. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
blindpirate
reviewed
Jan 19, 2026
blindpirate
left a comment
Member
There was a problem hiding this comment.
Sorry for the delay. I think this PR makes totally sense and I appreciate your contribution. Please proceed with you proposed change in the comment and it's good to go!
blindpirate
reviewed
Jan 20, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
|
The following builds have passed: |
blindpirate
approved these changes
Jan 20, 2026
blindpirate
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks for the contribution!
Member
|
@bot-gradle squash and merge |
Collaborator
|
We don't support squashing contributor's PR yet. |
- getDifferentJdk() and getDifferentVersion() now throw IllegalStateException with actionable error messages instead of returning null - Added lenient variants getDifferentJdkOrNull() and getDifferentVersionOrNull() for cases that need nullable returns - Added isDifferentJdkAvailable() and isDifferentVersionAvailable() for use in test preconditions - Updated IntegTestPreconditions to use the new boolean methods - Added `@Requires` annotations to tests that rely on these methods Co-authored-by: JulianW03 <woelkjulian@gmail.com>
0221785 to
db77830
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #35766
@Requiresannotations to tests that rely on these methodsContext
See root issue for context.
Additional Notes
While working on this, I noticed several places where the precondition and actual usage seem mismatched (e.g., checking DifferentVersionAvailable but using getDifferentJdk()). I've flagged these with comments in the code. Could you clarify if these are bugs or intentional?
Does this approach match what was envisioned in the issue discussion?
Are the Messages of the thrown exceptions good enough?
Should I apply changes like this to other methods aswell ( for example 'getDifferentVersion(final Spec<? super JvmInstallationMetadata> filter)')?
All of the changes are to the tests themselves. I dont think I need to add unit tests is that correct ?
This is my first time contributing so any constructive feedback would be greatly appreciated.
Contributor Checklist
<subproject>/src/integTest) to verify changes from a user perspective.<subproject>/src/test) to verify logic../gradlew sanityCheck../gradlew <changed-subproject>:quickTest.Reviewing cheatsheet
Before merging the PR, comments starting with