Uh oh!
There was an error while loading. Please reload this page.
Enable coverage when testJvm same as Gradle Daemon JDK or with checkCoverage property - #11764
Conversation
🎯 Code Coverage (details) 🔗 Commit SHA: 0b89105 | Docs | Datadog PR Page | Give us feedback! |
🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
bric3
commented
Jun 30, 2026
/merge |
View all feedbacks in Devflow UI.
The expected merge time in
|
Uh oh!
There was an error while loading. Please reload this page.
What Does This Do
Coverage is now enabled if the
testJvmmatches the daemon JDK (as before), but now also when explicitly requested viacheckCoverageproperty which is consulted when the aggregate test task is being configured, but never was in the test jvm build extension.Note
You can consider this as a hotfix, because
checkCoverageis somewhat an unrelated property to the test jvm constraints plugin, it is a CI concern.At some point this might be refactored to a place with the proper scoped concerns.
Motivation
Code coverage was explicitly disabled when the
testJvmwas run on a different JDK.Coverage was disabled as a side effect of the old multi-JDK test optimization.
When
-PtestJvmwas introduced, the intent was to run the same Gradle Test tasks on another JDK instead of creating separate test tasks per JDK. For those additional JVM runs, Jacoco was explicitly disabled to avoid paying coverage instrumentation cost across the whole compatibility matrix. That made sense when coverage was expected to run only once, on the normal/base test JVM.The problem is that CI later also passed
-PtestJvm=8to the coverage job. While that was mostly harmless, once the daemon moved to a newer JDK, Java 21, the gitlab-ci conditionif [ "$testJvm" == "8" ]; then export GRADLE_PARAMS="-PskipFlakyTests -PcheckCoverage"; fiwas applied, but then made the Java 8 a real test launcher. Which then deactivated jacoco.Additional Notes
Instrumentations were deliberately not covered by jacoco, so only
base_testsjob is affected.History of related changes
testJvmConstraintsGradle extension to replace extra properties #9892Coverage fix PRs
config-utils#11781ProtocolVersiontests and exclude specific classes from coverage #11801OtelSpiMetricPeriodicActionfrom code coverage #11806Debugger tests are not covered in ci, and live under a different aggregate task, so the next is related, but not directly handled by this PR.