Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static io.opentelemetry.instrumentation.testing.junit.db.SemconvStabilityUtil.maybeStable;
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies;
import static io.opentelemetry.semconv.DbAttributes.DB_NAMESPACE;
import static io.opentelemetry.semconv.DbAttributes.DB_SYSTEM_NAME;
import static io.opentelemetry.semconv.NetworkAttributes.NETWORK_PEER_ADDRESS;
import static io.opentelemetry.semconv.NetworkAttributes.NETWORK_PEER_PORT;
Expand Down Expand Up @@ -151,9 +150,6 @@ void testSetCommand() {
SERVER_PORT,
NETWORK_PEER_ADDRESS,
NETWORK_PEER_PORT));
if (Boolean.getBoolean("testLatestDeps")) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somehow missed this while fixing lettuce latest dep test failures

expected.add(DB_NAMESPACE);
}
assertDurationMetric(testing(), "io.opentelemetry.lettuce-5.1", toArray(expected));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ dependencies {

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

tasks.withType<Test>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ dependencies {
add("javaSpring3CompileOnly", "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
add("javaSpring3CompileOnly", project(":instrumentation:spring:spring-web:spring-web-3.1:library"))
add("javaSpring3CompileOnly", project(":instrumentation:spring:spring-webmvc:spring-webmvc-6.0:library"))

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-actuator:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-aop:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-webflux:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-data-mongodb:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-data-r2dbc:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-data-jdbc:3.+") // documented limitation
}

val latestDepTest = findProperty("testLatestDeps") as Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ dependencies {

testLibrary("org.springframework.boot:spring-boot-starter-test:3.0.0")
testLibrary("org.springframework.boot:spring-boot-starter-web:3.0.0")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:3.+") // documented limitation
}

otelJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ dependencies {

testLibrary("org.springframework.cloud:spring-cloud-starter-gateway:2.2.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-test:2.2.0.RELEASE")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
}

tasks.withType<Test>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ dependencies {

testLibrary("org.springframework.boot:spring-boot-starter-test:3.0.0")
testLibrary("org.springframework.boot:spring-boot-starter:3.0.0")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
}

// spring 6 requires java 17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ dependencies {

testLibrary("org.springframework.boot:spring-boot-starter-test:2.5.3")
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
}

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

// the "library" configuration is not recognized by the test suite plugin
val springKafkaVersion = if (latestDepTest) "latest.release" else "2.7.0"
val springBootVersion = if (latestDepTest) "latest.release" else "2.5.3"
val springBootVersion = if (latestDepTest) "3.+" else "2.5.3"
implementation("org.springframework.kafka:spring-kafka:$springKafkaVersion")
implementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
implementation("org.springframework.boot:spring-boot-starter:$springBootVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ dependencies {

testLibrary("org.springframework.boot:spring-boot-starter-test:2.5.3")
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
}

tasks.withType<Test>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ dependencies {

testLibrary("org.springframework.boot:spring-boot-starter-test:3.2.4")
testLibrary("org.springframework.boot:spring-boot-starter:3.2.4")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
}

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

if (latestDepTest) {
implementation("org.springframework.pulsar:spring-pulsar:latest.release")
implementation("org.springframework.boot:spring-boot-starter-test:latest.release")
implementation("org.springframework.boot:spring-boot-starter:latest.release")
implementation("org.springframework.boot:spring-boot-starter-test:3.+")
implementation("org.springframework.boot:spring-boot-starter:3.+")
} else {
implementation("org.springframework.pulsar:spring-pulsar:1.0.0")
implementation("org.springframework.boot:spring-boot-starter-test:3.2.4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter:1.5.22.RELEASE")
// spring-retry is required by org.springframework.amqp:spring-rabbit:4.0.0
testLibrary("org.springframework.retry:spring-retry")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-webflux:2.0.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-test:2.0.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-reactor-netty:2.0.0.RELEASE")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-webflux:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-reactor-netty:3.+") // documented limitation
}

val latestDepTest = findProperty("testLatestDeps") as Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ dependencies {
compileOnly("org.springframework:spring-webmvc:5.3.0")
compileOnly("javax.servlet:javax.servlet-api:4.0.1")

testImplementation("org.springframework.boot:spring-boot-starter-web:$springBootVersion")
testImplementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion") {
testLibrary("org.springframework.boot:spring-boot-starter-web:$springBootVersion")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously we weren't testing the latest version here

testLibrary("org.springframework.boot:spring-boot-starter-test:$springBootVersion") {
exclude("org.junit.vintage", "junit-vintage-engine")
}

latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+") // see spring-webmvc-6.0 module
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+") // see spring-webmvc-6.0 module
}

configurations.testRuntimeClasspath {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-test:3.0.0")
testLibrary("org.springframework.boot:spring-boot-starter-web:3.0.0")
testLibrary("org.springframework.boot:spring-boot-starter-security:3.0.0")

// tests don't work with spring boot 4 yet
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:3.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-security:3.+") // documented limitation
}

// spring 6 requires java 17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ dependencies {
compileOnly("org.springframework:spring-webmvc:6.0.0")
compileOnly("jakarta.servlet:jakarta.servlet-api:5.0.0")

testImplementation("org.springframework.boot:spring-boot-starter-web:3.0.0")
testImplementation("org.springframework.boot:spring-boot-starter-test:3.0.0")
testLibrary("org.springframework.boot:spring-boot-starter-web:3.0.0")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously we weren't testing the latest version here

testLibrary("org.springframework.boot:spring-boot-starter-test:3.0.0")
}

// spring 6 requires java 17
Expand All @@ -26,4 +26,8 @@ tasks {
targetCompatibility = "1.8"
options.release.set(null as Int?)
}

withType<Test>().configureEach {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ protected void configure(HttpServerTestOptions options) {
return expectedHttpRoute(endpoint, method);
});

options.setResponseCodeOnNonStandardHttpMethod(501);
options.setResponseCodeOnNonStandardHttpMethod(
Boolean.getBoolean("testLatestDeps") ? 200 : 501);
}

@Test
Expand Down
Loading