Commit 0bbc2b0
Migrate debugger-integration-tests cross-project test source sharing to java-test-fixtures for Gradle 9.5 compatibility (#11416)
fix(smoke-tests): share debugger test helpers via java-test-fixtures
Gradle 9.5 added a `DependencyHandler.project(String)` overload that
returns a `ProjectDependency`. Inside a `dependencies { }` block, that
overload now shadows the `Project.project(String)` accessor that
previously resolved via Groovy fallback. Result:
`project(':foo').sourceSets` no longer reaches the producing project's
source sets — it hits a `DefaultProjectDependency` and fails with
"unknown property 'sourceSets'".
`dd-smoke-tests/debugger-integration-tests/build.gradle:21` used
`project(':dd-java-agent:agent-debugger').sourceSets.test.output` to
pull two helper classes (`LogProbeTestHelper`, `MoshiSnapshotTestHelper`)
from `agent-debugger`'s test sources.
Apply the canonical Gradle 9.5 fix (see #11367): expose the helpers via
the `java-test-fixtures` plugin on `agent-debugger`. The helpers move
from `src/test/java/com/datadog/debugger/util/` to
`src/testFixtures/java/com/datadog/debugger/util/` (same package), and
the consumer pulls them in via
`testImplementation testFixtures(project(':dd-java-agent:agent-debugger'))`.
The 15 existing in-project consumers (test classes inside agent-debugger)
keep working because the testFixtures source set is automatically on the
`test` source set's classpath.
This unblocks running the root build on Gradle 9.5.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chore(mongo): remove dead `sourceSets.test.output` comment in mongo-common
The commented-out line was left behind in #11367 as a marker for the
broken Gradle 9.5 pattern. The 9 mongo consumers have since migrated to
`testFixtures(project(':...:mongo-common'))`, and the cross-project
`sourceSets.test.output` reference is no longer used. Drop the comment.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>1 parent 3b1c46e commit 0bbc2b0
5 files changed
Lines changed: 11 additions & 3 deletions
File tree
- dd-java-agent
- agent-debugger
- src/testFixtures/java/com/datadog/debugger/util
- instrumentation/mongo/mongo-common
- dd-smoke-tests/debugger-integration-tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments