From 31fa7dc51200432810d053451076292eddd2db35 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 12:41:14 -0700 Subject: [PATCH] fix(deps): update junit5 monorepo to v5.11.0 (main) (minor) (#12010) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lauri Tulmin --- benchmark-overhead/build.gradle.kts | 2 +- conventions/build.gradle.kts | 2 +- dependencyManagement/build.gradle.kts | 2 +- examples/distro/build.gradle | 2 +- examples/extension/build.gradle | 2 +- gradle-plugins/build.gradle.kts | 2 +- .../cassandra/v4_0}/CassandraTest.java | 4 +++- .../quarkus2-testing/build.gradle.kts | 2 ++ .../quarkus3-testing/build.gradle.kts | 2 ++ .../spring/data/v1_8}/SpringJpaTest.java | 20 +++++++++++-------- .../spring/data/v3_0}/SpringJpaTest.java | 20 +++++++++++-------- .../spring/data}/AbstractSpringJpaTest.java | 20 ++++++++++--------- .../tapestry}/TapestryTest.java | 2 ++ 13 files changed, 50 insertions(+), 32 deletions(-) rename instrumentation/cassandra/cassandra-4.0/javaagent/src/test/java/{ => io/opentelemetry/javaagent/instrumentation/cassandra/v4_0}/CassandraTest.java (82%) rename instrumentation/spring/spring-data/spring-data-1.8/javaagent/src/test/java/{ => io/opentelemetry/javaagent/instrumentation/spring/data/v1_8}/SpringJpaTest.java (61%) rename instrumentation/spring/spring-data/spring-data-3.0/testing/src/test/java/{ => io/opentelemetry/javaagent/instrumentation/spring/data/v3_0}/SpringJpaTest.java (61%) rename instrumentation/spring/spring-data/spring-data-common/testing/src/main/java/{ => io/opentelemetry/javaagent/instrumentation/spring/data}/AbstractSpringJpaTest.java (96%) rename instrumentation/tapestry-5.4/javaagent/src/test/java/{ => io/opentelemetry/javaagent/instrumentation/tapestry}/TapestryTest.java (98%) diff --git a/benchmark-overhead/build.gradle.kts b/benchmark-overhead/build.gradle.kts index 9793e9c5cbf8..e43bab0693eb 100644 --- a/benchmark-overhead/build.gradle.kts +++ b/benchmark-overhead/build.gradle.kts @@ -16,7 +16,7 @@ repositories { } dependencies { - implementation(enforcedPlatform("org.junit:junit-bom:5.10.3")) + implementation(enforcedPlatform("org.junit:junit-bom:5.11.0")) testImplementation("org.testcontainers:testcontainers:1.20.1") testImplementation("org.testcontainers:postgresql:1.20.1") diff --git a/conventions/build.gradle.kts b/conventions/build.gradle.kts index 1454ffa411b8..70d7c0db637f 100644 --- a/conventions/build.gradle.kts +++ b/conventions/build.gradle.kts @@ -71,7 +71,7 @@ dependencies { implementation("net.ltgt.gradle:gradle-nullaway-plugin:2.0.0") implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.3") - testImplementation(enforcedPlatform("org.junit:junit-bom:5.10.3")) + testImplementation(enforcedPlatform("org.junit:junit-bom:5.11.0")) testImplementation("org.junit.jupiter:junit-jupiter-api") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") testImplementation("org.assertj:assertj-core:3.26.3") diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index d3714144b952..082e9d36fa67 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -33,7 +33,7 @@ val DEPENDENCY_BOMS = listOf( "org.apache.groovy:groovy-bom:${groovyVersion}", "io.opentelemetry:opentelemetry-bom:${otelSdkVersion}", "io.opentelemetry:opentelemetry-bom-alpha:${otelSdkAlphaVersion}", - "org.junit:junit-bom:5.10.3", + "org.junit:junit-bom:5.11.0", "org.testcontainers:testcontainers-bom:1.20.1", "org.spockframework:spock-bom:2.4-M4-groovy-4.0" ) diff --git a/examples/distro/build.gradle b/examples/distro/build.gradle index ddce2cd171f8..0c1928354124 100644 --- a/examples/distro/build.gradle +++ b/examples/distro/build.gradle @@ -34,7 +34,7 @@ subprojects { opentelemetryJavaagentAlpha: "2.7.0-alpha-SNAPSHOT", autoservice : "1.1.1", - junit : "5.10.3" + junit : "5.11.0" ] deps = [ diff --git a/examples/extension/build.gradle b/examples/extension/build.gradle index eded76b3b597..8e9dd67dfa5b 100644 --- a/examples/extension/build.gradle +++ b/examples/extension/build.gradle @@ -29,7 +29,7 @@ ext { opentelemetryJavaagent : "2.7.0-SNAPSHOT", opentelemetryJavaagentAlpha: "2.7.0-alpha-SNAPSHOT", - junit : "5.10.3" + junit : "5.11.0" ] deps = [ diff --git a/gradle-plugins/build.gradle.kts b/gradle-plugins/build.gradle.kts index 01cc58d93509..abfaf80bec32 100644 --- a/gradle-plugins/build.gradle.kts +++ b/gradle-plugins/build.gradle.kts @@ -43,7 +43,7 @@ dependencies { testImplementation("org.assertj:assertj-core:3.26.3") - testImplementation(enforcedPlatform("org.junit:junit-bom:5.10.3")) + testImplementation(enforcedPlatform("org.junit:junit-bom:5.11.0")) testImplementation("org.junit.jupiter:junit-jupiter-api") testImplementation("org.junit.jupiter:junit-jupiter-params") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") diff --git a/instrumentation/cassandra/cassandra-4.0/javaagent/src/test/java/CassandraTest.java b/instrumentation/cassandra/cassandra-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraTest.java similarity index 82% rename from instrumentation/cassandra/cassandra-4.0/javaagent/src/test/java/CassandraTest.java rename to instrumentation/cassandra/cassandra-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraTest.java index 4db6a86efbdb..1df7618a85c9 100644 --- a/instrumentation/cassandra/cassandra-4.0/javaagent/src/test/java/CassandraTest.java +++ b/instrumentation/cassandra/cassandra-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraTest.java @@ -3,12 +3,14 @@ * SPDX-License-Identifier: Apache-2.0 */ +package io.opentelemetry.javaagent.instrumentation.cassandra.v4_0; + import io.opentelemetry.cassandra.v4.common.AbstractCassandraTest; import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension; import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; import org.junit.jupiter.api.extension.RegisterExtension; -public class CassandraTest extends AbstractCassandraTest { +class CassandraTest extends AbstractCassandraTest { @RegisterExtension static final InstrumentationExtension testing = AgentInstrumentationExtension.create(); diff --git a/instrumentation/quarkus-resteasy-reactive/quarkus2-testing/build.gradle.kts b/instrumentation/quarkus-resteasy-reactive/quarkus2-testing/build.gradle.kts index 7304d19c9a64..ff63fb854165 100644 --- a/instrumentation/quarkus-resteasy-reactive/quarkus2-testing/build.gradle.kts +++ b/instrumentation/quarkus-resteasy-reactive/quarkus2-testing/build.gradle.kts @@ -10,6 +10,8 @@ otelJava { dependencies { implementation(enforcedPlatform("io.quarkus.platform:quarkus-bom:2.16.7.Final")) + // fails with junit 5.11.+ + implementation(enforcedPlatform("org.junit:junit-bom:5.10.3")) implementation("io.quarkus:quarkus-resteasy-reactive") testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent")) diff --git a/instrumentation/quarkus-resteasy-reactive/quarkus3-testing/build.gradle.kts b/instrumentation/quarkus-resteasy-reactive/quarkus3-testing/build.gradle.kts index 1d0b07983039..afd93f30ed41 100644 --- a/instrumentation/quarkus-resteasy-reactive/quarkus3-testing/build.gradle.kts +++ b/instrumentation/quarkus-resteasy-reactive/quarkus3-testing/build.gradle.kts @@ -16,6 +16,8 @@ if (findProperty("testLatestDeps") as Boolean) { dependencies { implementation(enforcedPlatform("io.quarkus.platform:quarkus-bom:$quarkusVersion")) + // fails with junit 5.11.+ + implementation(enforcedPlatform("org.junit:junit-bom:5.10.3")) implementation("io.quarkus:quarkus-resteasy-reactive") testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent")) diff --git a/instrumentation/spring/spring-data/spring-data-1.8/javaagent/src/test/java/SpringJpaTest.java b/instrumentation/spring/spring-data/spring-data-1.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/data/v1_8/SpringJpaTest.java similarity index 61% rename from instrumentation/spring/spring-data/spring-data-1.8/javaagent/src/test/java/SpringJpaTest.java rename to instrumentation/spring/spring-data/spring-data-1.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/data/v1_8/SpringJpaTest.java index a088c8589b6d..d662e52eb3d2 100644 --- a/instrumentation/spring/spring-data/spring-data-1.8/javaagent/src/test/java/SpringJpaTest.java +++ b/instrumentation/spring/spring-data/spring-data-1.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/data/v1_8/SpringJpaTest.java @@ -3,6 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ +package io.opentelemetry.javaagent.instrumentation.spring.data.v1_8; + +import io.opentelemetry.javaagent.instrumentation.spring.data.AbstractSpringJpaTest; import java.util.List; import java.util.Optional; import org.springframework.context.annotation.AnnotationConfigApplicationContext; @@ -13,27 +16,27 @@ public class SpringJpaTest extends AbstractSpringJpaTest { @Override - JpaCustomer newCustomer(String firstName, String lastName) { + protected JpaCustomer newCustomer(String firstName, String lastName) { return new JpaCustomer(firstName, lastName); } @Override - Long id(JpaCustomer customer) { + protected Long id(JpaCustomer customer) { return customer.getId(); } @Override - void setFirstName(JpaCustomer customer, String firstName) { + protected void setFirstName(JpaCustomer customer, String firstName) { customer.setFirstName(firstName); } @Override - Class repositoryClass() { + protected Class repositoryClass() { return JpaCustomerRepository.class; } @Override - JpaCustomerRepository repository() { + protected JpaCustomerRepository repository() { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(JpaPersistenceConfig.class); JpaCustomerRepository repo = context.getBean(JpaCustomerRepository.class); @@ -45,17 +48,18 @@ JpaCustomerRepository repository() { } @Override - List findByLastName(JpaCustomerRepository repository, String lastName) { + protected List findByLastName(JpaCustomerRepository repository, String lastName) { return repository.findByLastName(lastName); } @Override - List findSpecialCustomers(JpaCustomerRepository repository) { + protected List findSpecialCustomers(JpaCustomerRepository repository) { return repository.findSpecialCustomers(); } @Override - Optional findOneByLastName(JpaCustomerRepository repository, String lastName) { + protected Optional findOneByLastName( + JpaCustomerRepository repository, String lastName) { return repository.findOneByLastName(lastName); } } diff --git a/instrumentation/spring/spring-data/spring-data-3.0/testing/src/test/java/SpringJpaTest.java b/instrumentation/spring/spring-data/spring-data-3.0/testing/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/data/v3_0/SpringJpaTest.java similarity index 61% rename from instrumentation/spring/spring-data/spring-data-3.0/testing/src/test/java/SpringJpaTest.java rename to instrumentation/spring/spring-data/spring-data-3.0/testing/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/data/v3_0/SpringJpaTest.java index a088c8589b6d..fe4fffa719e5 100644 --- a/instrumentation/spring/spring-data/spring-data-3.0/testing/src/test/java/SpringJpaTest.java +++ b/instrumentation/spring/spring-data/spring-data-3.0/testing/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/data/v3_0/SpringJpaTest.java @@ -3,6 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ +package io.opentelemetry.javaagent.instrumentation.spring.data.v3_0; + +import io.opentelemetry.javaagent.instrumentation.spring.data.AbstractSpringJpaTest; import java.util.List; import java.util.Optional; import org.springframework.context.annotation.AnnotationConfigApplicationContext; @@ -13,27 +16,27 @@ public class SpringJpaTest extends AbstractSpringJpaTest { @Override - JpaCustomer newCustomer(String firstName, String lastName) { + protected JpaCustomer newCustomer(String firstName, String lastName) { return new JpaCustomer(firstName, lastName); } @Override - Long id(JpaCustomer customer) { + protected Long id(JpaCustomer customer) { return customer.getId(); } @Override - void setFirstName(JpaCustomer customer, String firstName) { + protected void setFirstName(JpaCustomer customer, String firstName) { customer.setFirstName(firstName); } @Override - Class repositoryClass() { + protected Class repositoryClass() { return JpaCustomerRepository.class; } @Override - JpaCustomerRepository repository() { + protected JpaCustomerRepository repository() { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(JpaPersistenceConfig.class); JpaCustomerRepository repo = context.getBean(JpaCustomerRepository.class); @@ -45,17 +48,18 @@ JpaCustomerRepository repository() { } @Override - List findByLastName(JpaCustomerRepository repository, String lastName) { + protected List findByLastName(JpaCustomerRepository repository, String lastName) { return repository.findByLastName(lastName); } @Override - List findSpecialCustomers(JpaCustomerRepository repository) { + protected List findSpecialCustomers(JpaCustomerRepository repository) { return repository.findSpecialCustomers(); } @Override - Optional findOneByLastName(JpaCustomerRepository repository, String lastName) { + protected Optional findOneByLastName( + JpaCustomerRepository repository, String lastName) { return repository.findOneByLastName(lastName); } } diff --git a/instrumentation/spring/spring-data/spring-data-common/testing/src/main/java/AbstractSpringJpaTest.java b/instrumentation/spring/spring-data/spring-data-common/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/data/AbstractSpringJpaTest.java similarity index 96% rename from instrumentation/spring/spring-data/spring-data-common/testing/src/main/java/AbstractSpringJpaTest.java rename to instrumentation/spring/spring-data/spring-data-common/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/data/AbstractSpringJpaTest.java index 670999905aa5..730fc05da074 100644 --- a/instrumentation/spring/spring-data/spring-data-common/testing/src/main/java/AbstractSpringJpaTest.java +++ b/instrumentation/spring/spring-data/spring-data-common/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/data/AbstractSpringJpaTest.java @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +package io.opentelemetry.javaagent.instrumentation.spring.data; + import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies; import static org.assertj.core.api.Assertions.catchThrowableOfType; @@ -33,23 +35,23 @@ public abstract class AbstractSpringJpaTest< @RegisterExtension private static final InstrumentationExtension testing = AgentInstrumentationExtension.create(); - abstract ENTITY newCustomer(String firstName, String lastName); + protected abstract ENTITY newCustomer(String firstName, String lastName); - abstract Long id(ENTITY customer); + protected abstract Long id(ENTITY customer); - abstract void setFirstName(ENTITY customer, String firstName); + protected abstract void setFirstName(ENTITY customer, String firstName); - abstract Class repositoryClass(); + protected abstract Class repositoryClass(); - abstract REPOSITORY repository(); + protected abstract REPOSITORY repository(); - abstract List findByLastName(REPOSITORY repository, String lastName); + protected abstract List findByLastName(REPOSITORY repository, String lastName); - abstract List findSpecialCustomers(REPOSITORY repository); + protected abstract List findSpecialCustomers(REPOSITORY repository); - abstract Optional findOneByLastName(REPOSITORY repository, String lastName); + protected abstract Optional findOneByLastName(REPOSITORY repository, String lastName); - void clearData() { + protected void clearData() { testing.clearData(); } diff --git a/instrumentation/tapestry-5.4/javaagent/src/test/java/TapestryTest.java b/instrumentation/tapestry-5.4/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/tapestry/TapestryTest.java similarity index 98% rename from instrumentation/tapestry-5.4/javaagent/src/test/java/TapestryTest.java rename to instrumentation/tapestry-5.4/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/tapestry/TapestryTest.java index d6aadfd986b9..05d4d0209ee5 100644 --- a/instrumentation/tapestry-5.4/javaagent/src/test/java/TapestryTest.java +++ b/instrumentation/tapestry-5.4/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/tapestry/TapestryTest.java @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +package io.opentelemetry.javaagent.instrumentation.tapestry; + import static org.assertj.core.api.Assertions.assertThat; import io.opentelemetry.api.trace.SpanKind;