Skip to content

Commit 9ea03e9

Browse files
authored
Fix latest dep tests (#15429)
1 parent 9afeab6 commit 9ea03e9

File tree

15 files changed

+65
-12
lines changed

15 files changed

+65
-12
lines changed

instrumentation/lettuce/lettuce-5.1/testing/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import static io.opentelemetry.instrumentation.testing.junit.db.SemconvStabilityUtil.maybeStable;
1010
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
1111
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies;
12-
import static io.opentelemetry.semconv.DbAttributes.DB_NAMESPACE;
1312
import static io.opentelemetry.semconv.DbAttributes.DB_SYSTEM_NAME;
1413
import static io.opentelemetry.semconv.NetworkAttributes.NETWORK_PEER_ADDRESS;
1514
import static io.opentelemetry.semconv.NetworkAttributes.NETWORK_PEER_PORT;
@@ -151,9 +150,6 @@ void testSetCommand() {
151150
SERVER_PORT,
152151
NETWORK_PEER_ADDRESS,
153152
NETWORK_PEER_PORT));
154-
if (Boolean.getBoolean("testLatestDeps")) {
155-
expected.add(DB_NAMESPACE);
156-
}
157153
assertDurationMetric(testing(), "io.opentelemetry.lettuce-5.1", toArray(expected));
158154
}
159155

instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ dependencies {
2121

2222
// dependency management pins logback-classic to 1.3 which is the last release that supports java 8
2323
latestDepTestLibrary("ch.qos.logback:logback-classic:latest.release")
24+
// tests don't work with spring boot 4 yet
25+
latestDepTestLibrary("org.springframework.boot:spring-boot-actuator-autoconfigure:3.+") // documented limitation
2426
}
2527

2628
tasks.withType<Test>().configureEach {

instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ dependencies {
109109
add("javaSpring3CompileOnly", "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
110110
add("javaSpring3CompileOnly", project(":instrumentation:spring:spring-web:spring-web-3.1:library"))
111111
add("javaSpring3CompileOnly", project(":instrumentation:spring:spring-webmvc:spring-webmvc-6.0:library"))
112+
113+
// tests don't work with spring boot 4 yet
114+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
115+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-actuator:3.+") // documented limitation
116+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-aop:3.+") // documented limitation
117+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:3.+") // documented limitation
118+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-webflux:3.+") // documented limitation
119+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-data-mongodb:3.+") // documented limitation
120+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-data-r2dbc:3.+") // documented limitation
121+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-data-jdbc:3.+") // documented limitation
112122
}
113123

114124
val latestDepTest = findProperty("testLatestDeps") as Boolean

instrumentation/spring/spring-cloud-aws-3.0/javaagent/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ dependencies {
2121

2222
testLibrary("org.springframework.boot:spring-boot-starter-test:3.0.0")
2323
testLibrary("org.springframework.boot:spring-boot-starter-web:3.0.0")
24+
25+
// tests don't work with spring boot 4 yet
26+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
27+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:3.+") // documented limitation
2428
}
2529

2630
otelJava {

instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-2.2/testing/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ dependencies {
1313

1414
testLibrary("org.springframework.cloud:spring-cloud-starter-gateway:2.2.0.RELEASE")
1515
testLibrary("org.springframework.boot:spring-boot-starter-test:2.2.0.RELEASE")
16+
17+
// tests don't work with spring boot 4 yet
18+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
1619
}
1720

1821
tasks.withType<Test>().configureEach {

instrumentation/spring/spring-jms/spring-jms-6.0/javaagent/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ dependencies {
2727

2828
testLibrary("org.springframework.boot:spring-boot-starter-test:3.0.0")
2929
testLibrary("org.springframework.boot:spring-boot-starter:3.0.0")
30+
31+
// tests don't work with spring boot 4 yet
32+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
33+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
3034
}
3135

3236
// spring 6 requires java 17

instrumentation/spring/spring-kafka-2.7/javaagent/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ dependencies {
2929

3030
testLibrary("org.springframework.boot:spring-boot-starter-test:2.5.3")
3131
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")
32+
33+
// tests don't work with spring boot 4 yet
34+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
35+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
3236
}
3337

3438
val latestDepTest = findProperty("testLatestDeps") as Boolean
@@ -42,7 +46,7 @@ testing {
4246

4347
// the "library" configuration is not recognized by the test suite plugin
4448
val springKafkaVersion = if (latestDepTest) "latest.release" else "2.7.0"
45-
val springBootVersion = if (latestDepTest) "latest.release" else "2.5.3"
49+
val springBootVersion = if (latestDepTest) "3.+" else "2.5.3"
4650
implementation("org.springframework.kafka:spring-kafka:$springKafkaVersion")
4751
implementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
4852
implementation("org.springframework.boot:spring-boot-starter:$springBootVersion")

instrumentation/spring/spring-kafka-2.7/library/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ dependencies {
2121

2222
testLibrary("org.springframework.boot:spring-boot-starter-test:2.5.3")
2323
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")
24+
25+
// tests don't work with spring boot 4 yet
26+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
27+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
2428
}
2529

2630
tasks.withType<Test>().configureEach {

instrumentation/spring/spring-pulsar-1.0/javaagent/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ dependencies {
2222

2323
testLibrary("org.springframework.boot:spring-boot-starter-test:3.2.4")
2424
testLibrary("org.springframework.boot:spring-boot-starter:3.2.4")
25+
26+
// tests don't work with spring boot 4 yet
27+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
28+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
2529
}
2630

2731
val latestDepTest = findProperty("testLatestDeps") as Boolean
@@ -35,8 +39,8 @@ testing {
3539

3640
if (latestDepTest) {
3741
implementation("org.springframework.pulsar:spring-pulsar:latest.release")
38-
implementation("org.springframework.boot:spring-boot-starter-test:latest.release")
39-
implementation("org.springframework.boot:spring-boot-starter:latest.release")
42+
implementation("org.springframework.boot:spring-boot-starter-test:3.+")
43+
implementation("org.springframework.boot:spring-boot-starter:3.+")
4044
} else {
4145
implementation("org.springframework.pulsar:spring-pulsar:1.0.0")
4246
implementation("org.springframework.boot:spring-boot-starter-test:3.2.4")

instrumentation/spring/spring-rabbit-1.0/javaagent/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ dependencies {
2323
testLibrary("org.springframework.boot:spring-boot-starter:1.5.22.RELEASE")
2424
// spring-retry is required by org.springframework.amqp:spring-rabbit:4.0.0
2525
testLibrary("org.springframework.retry:spring-retry")
26+
27+
// tests don't work with spring boot 4 yet
28+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
29+
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
2630
}
2731

2832
tasks {

0 commit comments

Comments
 (0)