Reuse source sets for forked test tasks - #12308
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
More details
The migrated tasks keep their source-set output, runtime classpath, forked-test filters, JVM limits, and latest-dependency flag behavior.
🤖 Datadog Autotest · Commit 37f08f6 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
🟢 Java Benchmark SLOs — All performance SLOs passed
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. |
Avoid Maven Central fallback when proxy is configured Co-authored-by: alexey.kuznetsov <alexey.kuznetsov@datadoghq.com>
37f08f6 to
3a28977
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
Avoid Maven Central fallback when proxy is configured (#12403) Avoid Maven Central fallback when proxy is configured Co-authored-by: alexey.kuznetsov <alexey.kuznetsov@datadoghq.com> Reuse source sets for forked test tasks Co-authored-by: alexey.kuznetsov <alexey.kuznetsov@datadoghq.com>
What Does This Do
Replaces ten duplicate forked-test source sets across eight instrumentation modules with
addForkedTestTask(...).The affected tasks now reuse their parent source set's compiled output and runtime classpath instead of recompiling identical sources. This also removes redundant forked compile-task configuration, preserves the latest-dependency test flag for the new task name, and updates the Gradle guide.
The migrated modules cover Akka actor and HTTP, AWS SDK 1.x and 2.x, Spring scheduling and Web MVC, Tomcat, and Vert.x Web.
Motivation
#12147 introduces
addForkedTestTaskfor running a custom source set's*ForkedTestclasses in isolated JVMs.These modules currently create a second source set with the same sources and dependencies solely to obtain a forked runner. Reusing the original source set removes duplicate configurations and compilation while preserving test isolation and CI task selection.
This PR is stacked on #12147.
Additional Notes
Task names now follow the helper's
<sourceSetName>ForkedTestconvention; for example,latestDepForkedTestbecomeslatestDepTestForkedTestbecause it runs thelatestDepTestsource set.Validation:
./gradlew spotlessGroovyGradleCheckpassed.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]