Skip to content

Commit ebb3d53

Browse files
committed
batch 2
1 parent f50dbb8 commit ebb3d53

File tree

10 files changed

+196
-82
lines changed

10 files changed

+196
-82
lines changed

instrumentation/apache-dbcp-2.0/javaagent/build.gradle.kts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,28 @@ dependencies {
2121

2222
val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false"
2323

24-
tasks {
25-
val testStableSemconv by registering(Test::class) {
26-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
27-
28-
systemProperty("collectMetadata", collectMetadata)
29-
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
24+
testing {
25+
suites {
26+
val testStableSemconv by registering(JvmTestSuite::class) {
27+
targets {
28+
all {
29+
testTask.configure {
30+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
31+
systemProperty("collectMetadata", collectMetadata)
32+
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
33+
}
34+
}
35+
}
36+
}
3037
}
38+
}
3139

40+
tasks {
3241
test {
3342
systemProperty("collectMetadata", collectMetadata)
3443
}
3544

3645
check {
37-
dependsOn(testStableSemconv)
46+
dependsOn(testing.suites.named("testStableSemconv"))
3847
}
3948
}

instrumentation/apache-dbcp-2.0/library/build.gradle.kts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,22 @@ dependencies {
99
testImplementation(project(":instrumentation:apache-dbcp-2.0:testing"))
1010
}
1111

12-
tasks {
13-
val testStableSemconv by registering(Test::class) {
14-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
12+
testing {
13+
suites {
14+
val testStableSemconv by registering(JvmTestSuite::class) {
15+
targets {
16+
all {
17+
testTask.configure {
18+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
19+
}
20+
}
21+
}
22+
}
1523
}
24+
}
1625

26+
tasks {
1727
check {
18-
dependsOn(testStableSemconv)
28+
dependsOn(testing.suites.named("testStableSemconv"))
1929
}
2030
}

instrumentation/c3p0-0.9/javaagent/build.gradle.kts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,28 @@ dependencies {
2323

2424
val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false"
2525

26-
tasks {
27-
val testStableSemconv by registering(Test::class) {
28-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
29-
30-
systemProperty("collectMetadata", collectMetadata)
31-
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
26+
testing {
27+
suites {
28+
val testStableSemconv by registering(JvmTestSuite::class) {
29+
targets {
30+
all {
31+
testTask.configure {
32+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
33+
systemProperty("collectMetadata", collectMetadata)
34+
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
35+
}
36+
}
37+
}
38+
}
3239
}
40+
}
3341

42+
tasks {
3443
test {
3544
systemProperty("collectMetadata", collectMetadata)
3645
}
3746

3847
check {
39-
dependsOn(testStableSemconv)
48+
dependsOn(testing.suites.named("testStableSemconv"))
4049
}
4150
}

instrumentation/c3p0-0.9/library/build.gradle.kts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,22 @@ dependencies {
99
testImplementation(project(":instrumentation:c3p0-0.9:testing"))
1010
}
1111

12-
tasks {
13-
val testStableSemconv by registering(Test::class) {
14-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
12+
testing {
13+
suites {
14+
val testStableSemconv by registering(JvmTestSuite::class) {
15+
targets {
16+
all {
17+
testTask.configure {
18+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
19+
}
20+
}
21+
}
22+
}
1523
}
24+
}
1625

26+
tasks {
1727
check {
18-
dependsOn(testStableSemconv)
28+
dependsOn(testing.suites.named("testStableSemconv"))
1929
}
2030
}

instrumentation/hikaricp-3.0/javaagent/build.gradle.kts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,28 @@ dependencies {
2424

2525
val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false"
2626

27-
tasks {
28-
val testStableSemconv by registering(Test::class) {
29-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
30-
31-
systemProperty("collectMetadata", collectMetadata)
32-
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
27+
testing {
28+
suites {
29+
val testStableSemconv by registering(JvmTestSuite::class) {
30+
targets {
31+
all {
32+
testTask.configure {
33+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
34+
systemProperty("collectMetadata", collectMetadata)
35+
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
36+
}
37+
}
38+
}
39+
}
3340
}
41+
}
3442

43+
tasks {
3544
test {
3645
systemProperty("collectMetadata", collectMetadata)
3746
}
3847

3948
check {
40-
dependsOn(testStableSemconv)
49+
dependsOn(testing.suites.named("testStableSemconv"))
4150
}
4251
}

instrumentation/hikaricp-3.0/library/build.gradle.kts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,22 @@ dependencies {
99
testImplementation(project(":instrumentation:hikaricp-3.0:testing"))
1010
}
1111

12-
tasks {
13-
val testStableSemconv by registering(Test::class) {
14-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
12+
testing {
13+
suites {
14+
val testStableSemconv by registering(JvmTestSuite::class) {
15+
targets {
16+
all {
17+
testTask.configure {
18+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
19+
}
20+
}
21+
}
22+
}
1523
}
24+
}
1625

26+
tasks {
1727
check {
18-
dependsOn(testStableSemconv)
28+
dependsOn(testing.suites.named("testStableSemconv"))
1929
}
2030
}

instrumentation/jdbc/javaagent/build.gradle.kts

Lines changed: 59 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -54,51 +54,79 @@ sourceSets {
5454
}
5555
}
5656

57-
tasks {
58-
val testSlick by registering(Test::class) {
59-
filter {
60-
includeTestsMatching("SlickTest")
57+
testing {
58+
suites {
59+
val testSlick by registering(JvmTestSuite::class) {
60+
targets {
61+
all {
62+
testTask.configure {
63+
filter {
64+
includeTestsMatching("SlickTest")
65+
}
66+
include("**/SlickTest.*")
67+
}
68+
}
69+
}
6170
}
62-
include("**/SlickTest.*")
63-
}
6471

65-
test {
66-
filter {
67-
excludeTestsMatching("SlickTest")
68-
excludeTestsMatching("PreparedStatementParametersTest")
72+
val testStableSemconv by registering(JvmTestSuite::class) {
73+
targets {
74+
all {
75+
testTask.configure {
76+
filter {
77+
excludeTestsMatching("SlickTest")
78+
excludeTestsMatching("PreparedStatementParametersTest")
79+
}
80+
jvmArgs("-Dotel.instrumentation.jdbc-datasource.enabled=true")
81+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
82+
}
83+
}
84+
}
6985
}
70-
jvmArgs("-Dotel.instrumentation.jdbc-datasource.enabled=true")
71-
}
7286

73-
val testStableSemconv by registering(Test::class) {
74-
filter {
75-
excludeTestsMatching("SlickTest")
76-
excludeTestsMatching("PreparedStatementParametersTest")
87+
val testSlickStableSemconv by registering(JvmTestSuite::class) {
88+
targets {
89+
all {
90+
testTask.configure {
91+
filter {
92+
includeTestsMatching("SlickTest")
93+
}
94+
include("**/SlickTest.*")
95+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
96+
}
97+
}
98+
}
7799
}
78-
jvmArgs("-Dotel.instrumentation.jdbc-datasource.enabled=true")
79-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
80-
}
81100

82-
val testSlickStableSemconv by registering(Test::class) {
83-
filter {
84-
includeTestsMatching("SlickTest")
101+
val testCaptureParameters by registering(JvmTestSuite::class) {
102+
targets {
103+
all {
104+
testTask.configure {
105+
filter {
106+
includeTestsMatching("PreparedStatementParametersTest")
107+
}
108+
jvmArgs("-Dotel.instrumentation.jdbc.experimental.capture-query-parameters=true")
109+
}
110+
}
111+
}
85112
}
86-
include("**/SlickTest.*")
87-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
88113
}
114+
}
89115

90-
val testCaptureParameters by registering(Test::class) {
116+
tasks {
117+
test {
91118
filter {
92-
includeTestsMatching("PreparedStatementParametersTest")
119+
excludeTestsMatching("SlickTest")
120+
excludeTestsMatching("PreparedStatementParametersTest")
93121
}
94-
jvmArgs("-Dotel.instrumentation.jdbc.experimental.capture-query-parameters=true")
122+
jvmArgs("-Dotel.instrumentation.jdbc-datasource.enabled=true")
95123
}
96124

97125
check {
98-
dependsOn(testSlick)
99-
dependsOn(testStableSemconv)
100-
dependsOn(testSlickStableSemconv)
101-
dependsOn(testCaptureParameters)
126+
dependsOn(testing.suites.named("testSlick"))
127+
dependsOn(testing.suites.named("testStableSemconv"))
128+
dependsOn(testing.suites.named("testSlickStableSemconv"))
129+
dependsOn(testing.suites.named("testCaptureParameters"))
102130
}
103131
}
104132

instrumentation/jdbc/library/build.gradle.kts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ dependencies {
1515
testImplementation(project(":instrumentation:jdbc:testing"))
1616
}
1717

18+
testing {
19+
suites {
20+
val testStableSemconv by registering(JvmTestSuite::class) {
21+
targets {
22+
all {
23+
testTask.configure {
24+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
25+
}
26+
}
27+
}
28+
}
29+
}
30+
}
31+
1832
tasks {
1933
// We cannot use "--release" javac option here because that will forbid using apis that were added
2034
// in later versions. In JDBC wrappers we wish to implement delegation for methods that are not
@@ -51,12 +65,8 @@ tasks {
5165
include("io/opentelemetry/javaagent/bootstrap/**")
5266
}
5367

54-
val testStableSemconv by registering(Test::class) {
55-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
56-
}
57-
5868
check {
59-
dependsOn(testStableSemconv)
69+
dependsOn(testing.suites.named("testStableSemconv"))
6070
}
6171
}
6272

instrumentation/oracle-ucp-11.2/javaagent/build.gradle.kts

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,29 @@ dependencies {
2222

2323
val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false"
2424

25+
testing {
26+
suites {
27+
val testStableSemconv by registering(JvmTestSuite::class) {
28+
targets {
29+
all {
30+
testTask.configure {
31+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
32+
systemProperty("collectMetadata", collectMetadata)
33+
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
34+
}
35+
}
36+
}
37+
}
38+
}
39+
}
40+
2541
tasks {
2642
test {
2743
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
2844
systemProperty("collectMetadata", collectMetadata)
2945
}
3046

31-
val testStableSemconv by registering(Test::class) {
32-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
33-
34-
systemProperty("collectMetadata", collectMetadata)
35-
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
36-
}
37-
3847
check {
39-
dependsOn(testStableSemconv)
48+
dependsOn(testing.suites.named("testStableSemconv"))
4049
}
4150
}

0 commit comments

Comments
 (0)