fix: add JUnit Platform launcher + testClassesDirs for Gradle 9#20429
Conversation
Reverts the Gradle 8.13 downgrade (PR #20384) and fixes the root cause: 1. junit-platform-launcher runtimeOnly dependency — Gradle 9 removed auto-provisioning. Without this, test tasks fail with "Failed to load JUnit Platform." 2. testClassesDirs + classpath wiring in configureEach — Gradle 9's register<Test> tasks don't inherit the test source set. Without this, custom test tasks (testBAT, testSMOKE, etc.) report NO-SOURCE even after compilation succeeds. Root cause verified locally and on CI: - compileTestGroovy produces class files - testSMOKE/testBAT find and execute tests - 78+ BAT tests pass on KinD Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
🚀 Build Images ReadyImages are ready for commit d0bb99a. To use with deploy scripts: export MAIN_IMAGE_TAG=4.12.x-127-gd0bb99a0bd |
…radle 9 The protobuf plugin 0.8.19 uses the deprecated 'convention' API which was removed in Gradle 9. Upgrading to protobuf plugin 0.10+ requires API migration in both build.gradle.kts (sourceSet.java → sourceSet.extensions) and protobuf.gradle (DSL changes). Keep the JUnit Platform and testClassesDirs fixes — they're needed for both Gradle 8 and 9. The Gradle 9 upgrade needs to be paired with the protobuf plugin migration as a separate effort. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #20429 +/- ##
==========================================
- Coverage 49.65% 49.62% -0.03%
==========================================
Files 2799 2800 +1
Lines 212919 212996 +77
==========================================
- Hits 105715 105697 -18
- Misses 99471 99559 +88
- Partials 7733 7740 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/test eks-qa-e2e-tests |
Summary
Adds two fixes to
qa-tests-backend/build.gradle.ktsthat prepare for Gradle 9 and don't hurt on Gradle 8:junit-platform-launcher—runtimeOnlydependency. Gradle 9 removed auto-provisioning. Without it, test tasks fail with "Failed to load JUnit Platform."testClassesDirs+classpathwiring — Gradle 9'sregister<Test>tasks don't inherit the test source set. Without it, custom tasks (testBAT, testSMOKE) reportNO-SOURCE. Added inconfigureEachblock.Why not Gradle 9?
The
com.google.protobufplugin (0.8.19) uses the deprecatedconventionAPI removed in Gradle 9. Upgrading requires migrating to protobuf plugin 0.10+ which has DSL breaking changes. That's a separate, larger effort.These two fixes are forward-compatible — they work on both Gradle 8 and 9, so when the protobuf plugin is upgraded, the test infrastructure is already ready.
Test plan
🤖 Generated with Claude Code