Skip to content

Fix the Windows system tests under Java 25 - #976

Closed
DreierF wants to merge 3 commits into
masterfrom
ts/windows-system-test-diagnostics
Closed

DreierF wants to merge 3 commits into
masterfrom
ts/windows-system-test-diagnostics

Conversation

@DreierF

@DreierF DreierF commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #975: contains the Java 25 bump plus the two changes that make it pass on Windows.

What broke

system-tests/gradle-multi-module/gradle-project/gradle/gradle-daemon-jvm.properties pinned the fixture's Gradle daemon to Java 21. That is stricter than the Java 21 toolchain the fixture's projects compile against, because the daemon's JVM is chosen by the launcher before the settings script is evaluated — so the foojay toolchain repository declared there does not exist yet and the JDK cannot be provisioned either.

While the runners ran Gradle on Java 21 the launcher's own JVM satisfied the requirement. On Java 25 it no longer does, and only the Linux runners keep their JDKs where the launcher detects them (/usr/lib/jvm); on Windows they live in the tool cache, so every nested build failed with

Unable to download toolchain matching the requirements ({languageVersion=21, ...}) from 'null', due to:
No defined toolchain download url for WINDOWS on x86_64 architecture.

The file is the only one of its kind in the repository and arrived as a stray in an unrelated commit (5a6b8cf); no test asserts anything about the daemon's JVM. The projects keep their Java 21 toolchain, which resolves normally once the build is running.

Why it took a CI round to find

A nested Gradle build that fails while configuring writes nothing but the single-use daemon notice to stdout and reports the failure on stderr. runGradle handed that result back to the caller, so the tests failed on Expected exactly one session, but got 0 and the cause never reached the test report. It now reports a failed build instead, which is what made the error above visible.

🤖 Generated with Claude Code

renovate Bot and others added 3 commits September 16, 2026 20:21
A build that fails while configuring writes nothing but the daemon notice to stdout and reports what went
wrong on stderr. runGradle handed that result back to the caller, so the test failed on whatever it asserted
about the coverage the build never produced, and the actual cause never reached the test report. That is
what makes the current Windows failures of gradle-multi-module unreadable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gradle-daemon-jvm.properties made the fixture's own Gradle daemon require Java 21, which is stricter than
the Java 21 toolchain the projects compile against: the daemon's JVM is picked by the launcher before the
settings script runs, so the toolchain repository that foojay registers there does not exist yet and the
JDK cannot be provisioned either. As long as the runners ran Gradle on Java 21 the launcher's own JVM
satisfied it. On Java 25 it no longer does, and only Linux keeps its JDKs somewhere the launcher detects
(/usr/lib/jvm); on Windows they live in the tool cache, so every nested build there failed with

    Unable to download toolchain matching the requirements ({languageVersion=21, ...}) from 'null', due to:
    No defined toolchain download url for WINDOWS on x86_64 architecture.

The file is the only one of its kind in the repository and arrived as a stray in an unrelated commit; no
test says anything about the daemon's JVM. The projects keep their Java 21 toolchain, which resolves
normally once the build is running.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@DreierF
DreierF force-pushed the ts/windows-system-test-diagnostics branch from 5579622 to de44117 Compare September 17, 2026 06:45
@DreierF DreierF changed the title Diagnose the Windows failures of gradle-multi-module under Java 25 Fix the Windows system tests under Java 25 Sep 17, 2026
@DreierF
DreierF marked this pull request as ready for review September 17, 2026 07:02
@DreierF

DreierF commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: the two fixes now live on renovate/java-jdk-25.x (#975), which already carries the Java 25 bump.

@DreierF DreierF closed this Sep 17, 2026
@DreierF
DreierF deleted the ts/windows-system-test-diagnostics branch September 17, 2026 07:16
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.

1 participant