Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update junit5 monorepo to v5.11.0 (main) (minor) #12010

Merged
merged 4 commits into from
Aug 15, 2024
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
2 changes: 1 addition & 1 deletion benchmark-overhead/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/distro/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ subprojects {
opentelemetryJavaagentAlpha: "2.7.0-alpha-SNAPSHOT",

autoservice : "1.1.1",
junit : "5.10.3"
junit : "5.11.0"
]

deps = [
Expand Down
2 changes: 1 addition & 1 deletion examples/extension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion gradle-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Copy link
Member

Choose a reason for hiding this comment

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

can you add a comment if this is intentional not to use 5.11.0?

Copy link
Contributor

Choose a reason for hiding this comment

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

Added a comment. I think quarkus also sets junit version and we end up with jars with conflicting versions. This PR just sets the last version where things worked.

implementation("io.quarkus:quarkus-resteasy-reactive")

testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -13,27 +16,27 @@
public class SpringJpaTest extends AbstractSpringJpaTest<JpaCustomer, JpaCustomerRepository> {

@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<JpaCustomerRepository> repositoryClass() {
protected Class<JpaCustomerRepository> repositoryClass() {
return JpaCustomerRepository.class;
}

@Override
JpaCustomerRepository repository() {
protected JpaCustomerRepository repository() {
AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext(JpaPersistenceConfig.class);
JpaCustomerRepository repo = context.getBean(JpaCustomerRepository.class);
Expand All @@ -45,17 +48,18 @@ JpaCustomerRepository repository() {
}

@Override
List<JpaCustomer> findByLastName(JpaCustomerRepository repository, String lastName) {
protected List<JpaCustomer> findByLastName(JpaCustomerRepository repository, String lastName) {
return repository.findByLastName(lastName);
}

@Override
List<JpaCustomer> findSpecialCustomers(JpaCustomerRepository repository) {
protected List<JpaCustomer> findSpecialCustomers(JpaCustomerRepository repository) {
return repository.findSpecialCustomers();
}

@Override
Optional<JpaCustomer> findOneByLastName(JpaCustomerRepository repository, String lastName) {
protected Optional<JpaCustomer> findOneByLastName(
JpaCustomerRepository repository, String lastName) {
return repository.findOneByLastName(lastName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -13,27 +16,27 @@
public class SpringJpaTest extends AbstractSpringJpaTest<JpaCustomer, JpaCustomerRepository> {

@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<JpaCustomerRepository> repositoryClass() {
protected Class<JpaCustomerRepository> repositoryClass() {
return JpaCustomerRepository.class;
}

@Override
JpaCustomerRepository repository() {
protected JpaCustomerRepository repository() {
AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext(JpaPersistenceConfig.class);
JpaCustomerRepository repo = context.getBean(JpaCustomerRepository.class);
Expand All @@ -45,17 +48,18 @@ JpaCustomerRepository repository() {
}

@Override
List<JpaCustomer> findByLastName(JpaCustomerRepository repository, String lastName) {
protected List<JpaCustomer> findByLastName(JpaCustomerRepository repository, String lastName) {
return repository.findByLastName(lastName);
}

@Override
List<JpaCustomer> findSpecialCustomers(JpaCustomerRepository repository) {
protected List<JpaCustomer> findSpecialCustomers(JpaCustomerRepository repository) {
return repository.findSpecialCustomers();
}

@Override
Optional<JpaCustomer> findOneByLastName(JpaCustomerRepository repository, String lastName) {
protected Optional<JpaCustomer> findOneByLastName(
JpaCustomerRepository repository, String lastName) {
return repository.findOneByLastName(lastName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<REPOSITORY> repositoryClass();
protected abstract Class<REPOSITORY> repositoryClass();

abstract REPOSITORY repository();
protected abstract REPOSITORY repository();

abstract List<ENTITY> findByLastName(REPOSITORY repository, String lastName);
protected abstract List<ENTITY> findByLastName(REPOSITORY repository, String lastName);

abstract List<ENTITY> findSpecialCustomers(REPOSITORY repository);
protected abstract List<ENTITY> findSpecialCustomers(REPOSITORY repository);

abstract Optional<ENTITY> findOneByLastName(REPOSITORY repository, String lastName);
protected abstract Optional<ENTITY> findOneByLastName(REPOSITORY repository, String lastName);

void clearData() {
protected void clearData() {
testing.clearData();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading