Skip to content

Add JDK 25 compatibility to functional tests#399

Closed
dantte-lp wants to merge 2 commits into
szpak:masterfrom
dantte-lp:fix/jdk25-functest-compat
Closed

Add JDK 25 compatibility to functional tests#399
dantte-lp wants to merge 2 commits into
szpak:masterfrom
dantte-lp:fix/jdk25-functest-compat

Conversation

@dantte-lp
Copy link
Copy Markdown
Contributor

@dantte-lp dantte-lp commented Mar 31, 2026

Summary

Adds graceful handling for JDK 25 in functional tests. No production code changes.

Changes

File Change Why
PitestPluginPitVersionFunctionalSpec Filter PIT < 1.19.0 on JDK 25+ ASM 9.7.1 doesn't support class file version 69 (safety net)
PitestPluginGradleVersionFunctionalSpec Add VERSION_25 → 9.4.1 to compat map Per Gradle compatibility matrix

Backward compatibility

All changes are conditional on JavaVersion >= 25 — no impact when running on JDK 17/21/24 (current CI matrix).

Test results

JDK 17: ./gradlew clean check funcTest → BUILD SUCCESSFUL
JDK 21: ./gradlew clean check funcTest → BUILD SUCCESSFUL

Notes

The @IgnoreIf for historyInputLocation on JDK 25 was removed after standalone testing confirmed PIT 1.22.1 (ASM 9.9.1) works correctly with history files on JDK 25 + class file version 69.

- Filter PIT versions < 1.19.0 on JDK 25+ (ASM 9.7 doesn't support class file version 69)
- Skip historyInputLocation test on JDK 25+ (PIT internal error)
- Add JDK 25 → Gradle 9.4.1 entry to Java/Gradle compatibility map
Standalone testing confirmed PIT 1.22.1 (ASM 9.9.1) works correctly
with historyInputLocation on JDK 25 + class file version 69.
The skip was based on an incorrect assumption.
@dantte-lp
Copy link
Copy Markdown
Contributor Author

dantte-lp commented Apr 1, 2026

Removed the @IgnoreIf for historyInputLocation — pushed 92b2f40.

Investigation results:

I ran standalone tests on Gradle 9.4.1 / GraalVM JDK 25.0.2 to check whether PIT actually crashes with historyInputLocation on JDK 25:

PIT sourceCompatibility Class version historyInput Result
1.22.1 17 61 yes PASS
1.22.1 25 69 yes PASS
1.22.1 25 69 no PASS
1.18.0 17 61 no PASS

PIT 1.22.1 (ASM 9.9.1) works correctly with historyInputLocation on JDK 25, even with class file version 69. The original @IgnoreIf was based on an incorrect assumption about ASM compatibility.

The remaining changes in this PR (PIT version filter for JDK 25+ and the Gradle version compatibility map entry) are still valid as safety nets for older PIT versions.

Full QA investigation: https://gist.github.com/dantte-lp/17c4e0aa3f5f84d6831cb12ceed9853b

@szpak
Copy link
Copy Markdown
Owner

szpak commented Apr 1, 2026

TBH, I don't know how you/agent was able to test it in isolation. I spent some time today tweaking the configuration (and tests) for Gradle 9.1.0 compatibility (which is required for JDK 25 - #401).

@szpak
Copy link
Copy Markdown
Owner

szpak commented Apr 1, 2026

Btw, even there I have some failing tests with JDK 25, but it is late, so @dantte-lp, I you would like to work on that branch to make all green with JDK 25, it would be great :-).

@szpak
Copy link
Copy Markdown
Owner

szpak commented Apr 1, 2026

so @dantte-lp, I you would like to work on that branch to make all green with JDK 25, it would be great :-).

Just a moment after I sent it, I realized you already "fixed" one test in this MR and I fixed also the rest... Sorry for noise.

@szpak
Copy link
Copy Markdown
Owner

szpak commented Apr 7, 2026

Let's close it in favor of (derived from that one) #401 which (in addition) effectively allows to run Gradle with JDK 25 (although this one ha nicer summary ;-) ).

@szpak szpak closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants