Skip to content

Commit 7ef1f30

Browse files
committed
add tests
1 parent e94604a commit 7ef1f30

File tree

15 files changed

+125
-19
lines changed

15 files changed

+125
-19
lines changed

instrumentation/apache-dubbo-2.7/library-autoconfigure/build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,16 @@ tasks.withType<Test>().configureEach {
2121
// required on jdk17
2222
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
2323
}
24+
25+
tasks {
26+
val testStableSemconv by registering(Test::class) {
27+
testClassesDirs = sourceSets.test.get().output.classesDirs
28+
classpath = sourceSets.test.get().runtimeClasspath
29+
30+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc")
31+
}
32+
33+
check {
34+
dependsOn(testStableSemconv)
35+
}
36+
}

instrumentation/armeria/armeria-grpc-1.14/javaagent/build.gradle.kts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,25 @@ afterEvaluate {
5959
}
6060
}
6161

62-
tasks.test {
63-
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
64-
}
62+
tasks {
63+
test {
64+
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
65+
}
66+
67+
val testStableSemconv by registering(Test::class) {
68+
testClassesDirs = sourceSets.test.get().output.classesDirs
69+
classpath = sourceSets.test.get().runtimeClasspath
70+
71+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc")
72+
}
73+
74+
check {
75+
dependsOn(testStableSemconv)
76+
}
6577

66-
if (findProperty("denyUnsafe") as Boolean) {
67-
tasks.withType<Test>().configureEach {
68-
enabled = false
78+
if (findProperty("denyUnsafe") as Boolean) {
79+
withType<Test>().configureEach {
80+
enabled = false
81+
}
6982
}
7083
}

instrumentation/aws-sdk/aws-sdk-1.11/javaagent/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ tasks {
159159
testClassesDirs = sourceSets.test.get().output.classesDirs
160160
classpath = sourceSets.test.get().runtimeClasspath
161161

162-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
162+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc,database")
163163
systemProperty("collectMetadata", collectMetadata)
164-
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
164+
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=rpc,database")
165165
}
166166

167167
check {

instrumentation/aws-sdk/aws-sdk-1.11/library-autoconfigure/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,15 @@ tasks {
4646
jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
4747
}
4848

49+
val testStableSemconv by registering(Test::class) {
50+
testClassesDirs = sourceSets.test.get().output.classesDirs
51+
classpath = sourceSets.test.get().runtimeClasspath
52+
53+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc")
54+
}
55+
4956
check {
50-
dependsOn(testReceiveSpansDisabled)
57+
dependsOn(testReceiveSpansDisabled, testStableSemconv)
5158
}
5259
}
5360

instrumentation/aws-sdk/aws-sdk-1.11/library/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ tasks {
5555
val testStableSemconv by registering(Test::class) {
5656
testClassesDirs = sourceSets.test.get().output.classesDirs
5757
classpath = sourceSets.test.get().runtimeClasspath
58-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
58+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc,database")
5959
}
6060

6161
check {

instrumentation/aws-sdk/aws-sdk-2.2/javaagent/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ tasks {
203203
excludeTestsMatching("Aws2SqsSuppressReceiveSpansTest")
204204
}
205205
systemProperty("otel.instrumentation.messaging.experimental.receive-telemetry.enabled", "true")
206-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
206+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc,database")
207207

208-
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
208+
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=rpc,database")
209209
}
210210

211211
test {

instrumentation/aws-sdk/aws-sdk-2.2/library-autoconfigure/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tasks {
3636
testClassesDirs = sourceSets.test.get().output.classesDirs
3737
classpath = sourceSets.test.get().runtimeClasspath
3838

39-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
39+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc,database")
4040
}
4141

4242
check {

instrumentation/aws-sdk/aws-sdk-2.2/library/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ tasks {
8181
testClassesDirs = sourceSets.test.get().output.classesDirs
8282
classpath = sourceSets.test.get().runtimeClasspath
8383

84-
jvmArgs("-Dotel.semconv-stability.opt-in=database")
84+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc,database")
8585
}
8686

8787
check {

instrumentation/camel-2.20/javaagent/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,15 @@ tasks {
101101
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
102102
}
103103

104+
val testStableSemconvRpc by registering(Test::class) {
105+
testClassesDirs = sourceSets.test.get().output.classesDirs
106+
classpath = sourceSets.test.get().runtimeClasspath
107+
108+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc")
109+
}
110+
104111
check {
105-
dependsOn(testStableSemconv, testExperimental)
112+
dependsOn(testStableSemconv, testStableSemconvRpc, testExperimental)
106113
}
107114

108115
if (findProperty("denyUnsafe") as Boolean) {

instrumentation/grpc-1.6/javaagent/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,15 @@ tasks {
7474
jvmArgs("-Dotel.instrumentation.grpc.experimental-span-attributes=true")
7575
}
7676

77+
val testStableSemconv by registering(Test::class) {
78+
testClassesDirs = sourceSets.test.get().output.classesDirs
79+
classpath = sourceSets.test.get().runtimeClasspath
80+
81+
jvmArgs("-Dotel.semconv-stability.opt-in=rpc")
82+
}
83+
7784
check {
78-
dependsOn(testExperimental)
85+
dependsOn(testExperimental, testStableSemconv)
7986
}
8087
}
8188

0 commit comments

Comments
 (0)