Skip to content

Commit 6aba385

Browse files
committed
batch 3
1 parent ebb3d53 commit 6aba385

File tree

10 files changed

+138
-52
lines changed

10 files changed

+138
-52
lines changed

instrumentation/alibaba-druid-1.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/alibaba-druid-1.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:alibaba-druid-1.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/hibernate/hibernate-3.3/javaagent/build.gradle.kts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ if (findProperty("testLatestDeps") as Boolean) {
4848
}
4949
}
5050

51+
testing {
52+
suites {
53+
val testStableSemconv by registering(JvmTestSuite::class) {
54+
targets {
55+
all {
56+
testTask.configure {
57+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
58+
}
59+
}
60+
}
61+
}
62+
}
63+
}
64+
5165
tasks {
5266
withType<Test>().configureEach {
5367
// TODO run tests both with and without experimental span attributes
@@ -57,11 +71,7 @@ tasks {
5771
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
5872
}
5973

60-
val testStableSemconv by registering(Test::class) {
61-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
62-
}
63-
6474
check {
65-
dependsOn(testStableSemconv)
75+
dependsOn(testing.suites.named("testStableSemconv"))
6676
}
6777
}

instrumentation/hibernate/hibernate-4.0/javaagent/build.gradle.kts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ testing {
6868
}
6969
}
7070
}
71+
72+
val testStableSemconv by registering(JvmTestSuite::class) {
73+
targets {
74+
all {
75+
testTask.configure {
76+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
77+
}
78+
}
79+
}
80+
}
7181
}
7282
}
7383

@@ -84,12 +94,8 @@ tasks {
8494
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
8595
}
8696

87-
val testStableSemconv by registering(Test::class) {
88-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
89-
}
90-
9197
check {
9298
dependsOn(testing.suites)
93-
dependsOn(testStableSemconv)
99+
dependsOn(testing.suites.named("testStableSemconv"))
94100
}
95101
}

instrumentation/hibernate/hibernate-6.0/javaagent/build.gradle.kts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ testing {
6262
}
6363
}
6464
}
65+
66+
val testStableSemconv by registering(JvmTestSuite::class) {
67+
targets {
68+
all {
69+
testTask.configure {
70+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
71+
}
72+
}
73+
}
74+
}
6575
}
6676
}
6777

@@ -83,12 +93,8 @@ tasks {
8393
}
8494
}
8595

86-
val testStableSemconv by registering(Test::class) {
87-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
88-
}
89-
9096
check {
91-
dependsOn(testStableSemconv)
97+
dependsOn(testing.suites.named("testStableSemconv"))
9298
dependsOn(testing.suites)
9399
}
94100
}

instrumentation/hibernate/hibernate-6.0/spring-testing/build.gradle.kts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ otelJava {
2424
minJavaVersionSupported.set(JavaVersion.VERSION_17)
2525
}
2626

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+
}
35+
}
36+
}
37+
}
38+
}
39+
}
40+
2741
tasks {
2842
withType<Test>().configureEach {
2943
jvmArgs("-javaagent:" + springAgent.singleFile.absolutePath)
@@ -34,11 +48,7 @@ tasks {
3448
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
3549
}
3650

37-
val testStableSemconv by registering(Test::class) {
38-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
39-
}
40-
4151
check {
42-
dependsOn(testStableSemconv)
52+
dependsOn(testing.suites.named("testStableSemconv"))
4353
}
4454
}

instrumentation/hibernate/hibernate-procedure-call-4.3/javaagent/build.gradle.kts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,27 @@ dependencies {
3131
latestDepTestLibrary("org.hibernate:hibernate-entitymanager:5.+") // documented limitation
3232
}
3333

34+
testing {
35+
suites {
36+
val testStableSemconv by registering(JvmTestSuite::class) {
37+
targets {
38+
all {
39+
testTask.configure {
40+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
41+
}
42+
}
43+
}
44+
}
45+
}
46+
}
47+
3448
tasks {
3549
withType<Test>().configureEach {
3650
// TODO run tests both with and without experimental span attributes
3751
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
3852
}
3953

40-
val testStableSemconv by registering(Test::class) {
41-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
42-
}
43-
4454
check {
45-
dependsOn(testStableSemconv)
55+
dependsOn(testing.suites.named("testStableSemconv"))
4656
}
4757
}

instrumentation/hibernate/hibernate-reactive-1.0/javaagent/build.gradle.kts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ testing {
7272
compileOnly("io.vertx:vertx-codegen:4.4.2")
7373
}
7474
}
75+
76+
val testStableSemconv by registering(JvmTestSuite::class) {
77+
targets {
78+
all {
79+
testTask.configure {
80+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
81+
}
82+
}
83+
}
84+
}
7585
}
7686
}
7787

@@ -104,13 +114,9 @@ tasks {
104114
}
105115
}
106116

107-
val testStableSemconv by registering(Test::class) {
108-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
109-
}
110-
111117
check {
112118
dependsOn(testing.suites)
113-
dependsOn(testStableSemconv)
119+
dependsOn(testing.suites.named("testStableSemconv"))
114120
}
115121
}
116122

instrumentation/vibur-dbcp-11.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/vibur-dbcp-11.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:vibur-dbcp-11.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
}

0 commit comments

Comments
 (0)