From 170c79ff296a8b8c69b5948910d2f66b67466fed Mon Sep 17 00:00:00 2001 From: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com> Date: Wed, 10 Apr 2024 12:54:45 -1000 Subject: [PATCH] Speeds up dubbo tests, aligns conventions and bumps deps (#1432) Signed-off-by: Adrian Cole --- brave-bom/pom.xml | 2 +- brave/pom.xml | 2 +- instrumentation/benchmarks/pom.xml | 4 ++-- instrumentation/dubbo/pom.xml | 2 +- .../src/test/java/brave/dubbo/TestServer.java | 6 ++--- instrumentation/grpc/pom.xml | 6 ++--- .../src/it/{grpc12 => grpc_floor}/README.md | 2 +- .../src/it/{grpc12 => grpc_floor}/pom.xml | 8 +++---- .../grpc/examples/helloworld/GraterGrpc.java | 0 .../grpc/examples/helloworld/GreeterGrpc.java | 0 .../grpc/examples/helloworld/HelloReply.java | 0 .../helloworld/HelloReplyOrBuilder.java | 0 .../examples/helloworld/HelloRequest.java | 0 .../helloworld/HelloRequestOrBuilder.java | 0 .../examples/helloworld/HelloWorldProto.java | 0 .../grpc12/ITTracingClientInterceptor.java | 4 ++-- .../grpc12/ITTracingServerInterceptor.java | 4 ++-- instrumentation/httpclient/pom.xml | 6 ++--- .../README.md | 2 +- .../pom.xml | 10 ++++----- .../ITTracingCachingHttpClientBuilder.java | 4 ++-- .../ITTracingHttpClientBuilder.java | 4 ++-- instrumentation/kafka-clients/pom.xml | 4 ++-- .../src/it/{kafka1 => kafka_floor}/README.md | 2 +- .../src/it/{kafka1 => kafka_floor}/pom.xml | 6 ++--- .../brave/kafka1/clients/ITKafkaTracing.java | 4 ++-- .../brave/kafka/clients/KafkaContainer.java | 2 +- .../brave/kafka/streams/KafkaContainer.java | 2 +- instrumentation/okhttp3/pom.xml | 6 ++--- .../{okhttp3_v3 => okhttp3_floor}/README.md | 2 +- .../it/{okhttp3_v3 => okhttp3_floor}/pom.xml | 8 +++---- .../okhttp3_v3/ITTracingCallFactory.java | 4 ++-- .../okhttp3_v3/ITTracingInterceptor.java | 4 ++-- .../brave/spring/rabbit/ITSpringRabbit.java | 2 +- instrumentation/spring-web/pom.xml | 3 ++- .../it/{spring3 => spring_floor}/README.md | 2 +- .../src/it/{spring3 => spring_floor}/pom.xml | 6 ++--- ...ITTracingClientHttpRequestInterceptor.java | 2 +- instrumentation/spring-webmvc/pom.xml | 4 +++- .../src/it/{spring25 => spring_floor}/pom.xml | 6 ++--- .../ITSpanCustomizingHandlerInterceptor.java | 2 +- .../src/test/resources/log4j2.properties | 0 pom.xml | 22 +++++++++---------- spring-beans/pom.xml | 4 +++- .../it/{spring25 => spring_floor}/README.md | 2 +- .../src/it/{spring25 => spring_floor}/pom.xml | 6 ++--- .../src/test/resources/log4j.properties | 0 47 files changed, 88 insertions(+), 83 deletions(-) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/README.md (97%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/pom.xml (97%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/main/java/io/grpc/examples/helloworld/GraterGrpc.java (100%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/main/java/io/grpc/examples/helloworld/GreeterGrpc.java (100%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/main/java/io/grpc/examples/helloworld/HelloReply.java (100%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/main/java/io/grpc/examples/helloworld/HelloReplyOrBuilder.java (100%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/main/java/io/grpc/examples/helloworld/HelloRequest.java (100%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/main/java/io/grpc/examples/helloworld/HelloRequestOrBuilder.java (100%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/main/java/io/grpc/examples/helloworld/HelloWorldProto.java (100%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/test/java/brave/grpc12/ITTracingClientInterceptor.java (92%) rename instrumentation/grpc/src/it/{grpc12 => grpc_floor}/src/test/java/brave/grpc12/ITTracingServerInterceptor.java (92%) rename instrumentation/httpclient/src/it/{httpclient_v43 => httpclient_floor}/README.md (79%) rename instrumentation/httpclient/src/it/{httpclient_v43 => httpclient_floor}/pom.xml (94%) rename instrumentation/httpclient/src/it/{httpclient_v43 => httpclient_floor}/src/test/java/brave/httpclient_v43/ITTracingCachingHttpClientBuilder.java (89%) rename instrumentation/httpclient/src/it/{httpclient_v43 => httpclient_floor}/src/test/java/brave/httpclient_v43/ITTracingHttpClientBuilder.java (89%) rename instrumentation/kafka-clients/src/it/{kafka1 => kafka_floor}/README.md (82%) rename instrumentation/kafka-clients/src/it/{kafka1 => kafka_floor}/pom.xml (96%) rename instrumentation/kafka-clients/src/it/{kafka1 => kafka_floor}/src/test/java/brave/kafka1/clients/ITKafkaTracing.java (88%) rename instrumentation/okhttp3/src/it/{okhttp3_v3 => okhttp3_floor}/README.md (80%) rename instrumentation/okhttp3/src/it/{okhttp3_v3 => okhttp3_floor}/pom.xml (96%) rename instrumentation/okhttp3/src/it/{okhttp3_v3 => okhttp3_floor}/src/test/java/brave/okhttp3_v3/ITTracingCallFactory.java (89%) rename instrumentation/okhttp3/src/it/{okhttp3_v3 => okhttp3_floor}/src/test/java/brave/okhttp3_v3/ITTracingInterceptor.java (89%) rename instrumentation/spring-web/src/it/{spring3 => spring_floor}/README.md (84%) rename instrumentation/spring-web/src/it/{spring3 => spring_floor}/pom.xml (96%) rename instrumentation/spring-web/src/it/{spring3 => spring_floor}/src/test/java/brave/spring/web3/ITTracingClientHttpRequestInterceptor.java (98%) rename instrumentation/spring-webmvc/src/it/{spring25 => spring_floor}/pom.xml (96%) rename instrumentation/spring-webmvc/src/it/{spring25 => spring_floor}/src/test/java/brave/spring/webmvc/ITSpanCustomizingHandlerInterceptor.java (99%) rename instrumentation/spring-webmvc/src/it/{spring25 => spring_floor}/src/test/resources/log4j2.properties (100%) rename spring-beans/src/it/{spring25 => spring_floor}/README.md (84%) rename spring-beans/src/it/{spring25 => spring_floor}/pom.xml (96%) rename spring-beans/src/it/{spring25 => spring_floor}/src/test/resources/log4j.properties (100%) diff --git a/brave-bom/pom.xml b/brave-bom/pom.xml index b6d3b9e08b..0c6e8f8184 100644 --- a/brave-bom/pom.xml +++ b/brave-bom/pom.xml @@ -293,7 +293,7 @@ maven-gpg-plugin - 3.1.0 + 3.2.2 sign-artifacts diff --git a/brave/pom.xml b/brave/pom.xml index 9069e16cae..5786a88959 100644 --- a/brave/pom.xml +++ b/brave/pom.xml @@ -77,7 +77,7 @@ io.micrometer micrometer-core - 1.12.3 + 1.12.5 test diff --git a/instrumentation/benchmarks/pom.xml b/instrumentation/benchmarks/pom.xml index 16d7fb1d29..5b5affcd30 100644 --- a/instrumentation/benchmarks/pom.xml +++ b/instrumentation/benchmarks/pom.xml @@ -30,7 +30,7 @@ ${project.basedir}/../.. 1.37 - 2.2.30.Final + 2.2.31.Final diff --git a/instrumentation/dubbo/src/test/java/brave/dubbo/TestServer.java b/instrumentation/dubbo/src/test/java/brave/dubbo/TestServer.java index d8d96ae847..083d657e7f 100644 --- a/instrumentation/dubbo/src/test/java/brave/dubbo/TestServer.java +++ b/instrumentation/dubbo/src/test/java/brave/dubbo/TestServer.java @@ -23,7 +23,6 @@ import java.util.concurrent.TimeUnit; import org.apache.dubbo.common.constants.CommonConstants; import org.apache.dubbo.config.ApplicationConfig; -import org.apache.dubbo.config.Constants; import org.apache.dubbo.config.ProtocolConfig; import org.apache.dubbo.config.RegistryConfig; import org.apache.dubbo.config.ServiceConfig; @@ -42,8 +41,10 @@ class TestServer { if (linkLocalIp != null) { // avoid dubbo's logic which might pick docker ip System.setProperty(CommonConstants.DUBBO_IP_TO_BIND, linkLocalIp); - System.setProperty(Constants.DUBBO_IP_TO_REGISTRY, linkLocalIp); + System.setProperty(CommonConstants.DubboProperty.DUBBO_IP_TO_REGISTRY, linkLocalIp); } + // reduce dubbo shutdown timeout to 1s + System.setProperty(CommonConstants.SHUTDOWN_WAIT_KEY, "1000"); service = new ServiceConfig<>(); service.setApplication(application); service.setRegistry(new RegistryConfig(RegistryConfig.NO_AVAILABLE)); @@ -51,7 +52,6 @@ class TestServer { } public void initService() { - service.setInterface(GreeterService.class); service.setRef((method, parameterTypes, args) -> { requestQueue.add(extractor.extract(RpcContext.getContext().getAttachments())); diff --git a/instrumentation/grpc/pom.xml b/instrumentation/grpc/pom.xml index 750d32f18a..e6509cccc0 100644 --- a/instrumentation/grpc/pom.xml +++ b/instrumentation/grpc/pom.xml @@ -33,8 +33,8 @@ 1.7.1 0.6.1 - 1.2.0 - 3.2.0 + 1.2.0 + 3.2.0 -Xep:MixedMutabilityReturnType:OFF @@ -183,7 +183,7 @@ io.grpc grpc-all - ${old-grpc.version} + ${floor-grpc.version} MAIN jar diff --git a/instrumentation/grpc/src/it/grpc12/README.md b/instrumentation/grpc/src/it/grpc_floor/README.md similarity index 97% rename from instrumentation/grpc/src/it/grpc12/README.md rename to instrumentation/grpc/src/it/grpc_floor/README.md index 28f9d2d59b..692992b353 100644 --- a/instrumentation/grpc/src/it/grpc12/README.md +++ b/instrumentation/grpc/src/it/grpc_floor/README.md @@ -1,4 +1,4 @@ -# grpc12 +# grpc_floor This tests that GrpcTracing does not require gRPC >1.2 Note: this uses manually generated protoc sources to remove a compile dependency on protoc. diff --git a/instrumentation/grpc/src/it/grpc12/pom.xml b/instrumentation/grpc/src/it/grpc_floor/pom.xml similarity index 97% rename from instrumentation/grpc/src/it/grpc12/pom.xml rename to instrumentation/grpc/src/it/grpc_floor/pom.xml index f91e2e62ae..02a2c8035c 100644 --- a/instrumentation/grpc/src/it/grpc12/pom.xml +++ b/instrumentation/grpc/src/it/grpc_floor/pom.xml @@ -1,7 +1,7 @@ -Xep:MissingOverride:OFF @@ -92,7 +92,7 @@ org.apache.kafka kafka-clients - ${old-kafka-clients.version} + ${kafka-clients-floor.version} MAIN jar diff --git a/instrumentation/kafka-clients/src/it/kafka1/README.md b/instrumentation/kafka-clients/src/it/kafka_floor/README.md similarity index 82% rename from instrumentation/kafka-clients/src/it/kafka1/README.md rename to instrumentation/kafka-clients/src/it/kafka_floor/README.md index 01a7efc405..c24ca5ff34 100644 --- a/instrumentation/kafka-clients/src/it/kafka1/README.md +++ b/instrumentation/kafka-clients/src/it/kafka_floor/README.md @@ -1,2 +1,2 @@ -# kafka1 +# kafka_floor This tests that KafkaPropagation can be used with kafka-client v<2 diff --git a/instrumentation/kafka-clients/src/it/kafka1/pom.xml b/instrumentation/kafka-clients/src/it/kafka_floor/pom.xml similarity index 96% rename from instrumentation/kafka-clients/src/it/kafka1/pom.xml rename to instrumentation/kafka-clients/src/it/kafka_floor/pom.xml index cc5a3f8712..5e6e55c090 100644 --- a/instrumentation/kafka-clients/src/it/kafka1/pom.xml +++ b/instrumentation/kafka-clients/src/it/kafka_floor/pom.xml @@ -20,9 +20,9 @@ 4.0.0 @project.groupId@ - kafka-clients-kafka1 + kafka-clients-kafka_floor @project.version@ - kafka-clients-kafka1 + kafka-clients-kafka_floor UTF-8 @@ -42,7 +42,7 @@ org.apache.kafka kafka-clients - @old-kafka-clients.version@ + @kafka-clients-floor.version@ org.slf4j diff --git a/instrumentation/kafka-clients/src/it/kafka1/src/test/java/brave/kafka1/clients/ITKafkaTracing.java b/instrumentation/kafka-clients/src/it/kafka_floor/src/test/java/brave/kafka1/clients/ITKafkaTracing.java similarity index 88% rename from instrumentation/kafka-clients/src/it/kafka1/src/test/java/brave/kafka1/clients/ITKafkaTracing.java rename to instrumentation/kafka-clients/src/it/kafka_floor/src/test/java/brave/kafka1/clients/ITKafkaTracing.java index 495674998c..9c2149124c 100644 --- a/instrumentation/kafka-clients/src/it/kafka1/src/test/java/brave/kafka1/clients/ITKafkaTracing.java +++ b/instrumentation/kafka-clients/src/it/kafka_floor/src/test/java/brave/kafka1/clients/ITKafkaTracing.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2023 The OpenZipkin Authors + * Copyright 2013-2024 The OpenZipkin Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package brave.kafka1.clients; +package brave.kafka_floor.clients; class ITKafkaTracing extends brave.kafka.clients.ITKafkaTracing { } diff --git a/instrumentation/kafka-clients/src/test/java/brave/kafka/clients/KafkaContainer.java b/instrumentation/kafka-clients/src/test/java/brave/kafka/clients/KafkaContainer.java index e97e639707..34a1c57a24 100644 --- a/instrumentation/kafka-clients/src/test/java/brave/kafka/clients/KafkaContainer.java +++ b/instrumentation/kafka-clients/src/test/java/brave/kafka/clients/KafkaContainer.java @@ -32,7 +32,7 @@ final class KafkaContainer extends GenericContainer { static final int KAFKA_PORT = 19092; KafkaContainer() { - super(parse("ghcr.io/openzipkin/zipkin-kafka:3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-kafka:3.1.1")); waitStrategy = Wait.forHealthcheck(); // Kafka broker listener port (19092) needs to be exposed for test cases to access it. addFixedExposedPort(KAFKA_PORT, KAFKA_PORT, InternetProtocol.TCP); diff --git a/instrumentation/kafka-streams/src/test/java/brave/kafka/streams/KafkaContainer.java b/instrumentation/kafka-streams/src/test/java/brave/kafka/streams/KafkaContainer.java index 85f6d1fac5..f17a46f743 100644 --- a/instrumentation/kafka-streams/src/test/java/brave/kafka/streams/KafkaContainer.java +++ b/instrumentation/kafka-streams/src/test/java/brave/kafka/streams/KafkaContainer.java @@ -32,7 +32,7 @@ final class KafkaContainer extends GenericContainer { static final int KAFKA_PORT = 19092; KafkaContainer() { - super(parse("ghcr.io/openzipkin/zipkin-kafka:3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-kafka:3.1.1")); waitStrategy = Wait.forHealthcheck(); // Kafka broker listener port (19092) needs to be exposed for test cases to access it. addFixedExposedPort(KAFKA_PORT, KAFKA_PORT, InternetProtocol.TCP); diff --git a/instrumentation/okhttp3/pom.xml b/instrumentation/okhttp3/pom.xml index 2baa5c6451..b190a059d7 100644 --- a/instrumentation/okhttp3/pom.xml +++ b/instrumentation/okhttp3/pom.xml @@ -31,8 +31,8 @@ ${project.basedir}/../.. - 3.11.0 - 2.9.0 + 3.11.0 + 2.11.0 @@ -83,7 +83,7 @@ com.squareup.okhttp3 mockwebserver - ${old-okhttp.version} + ${okhttp-floor.version} MAIN jar diff --git a/instrumentation/okhttp3/src/it/okhttp3_v3/README.md b/instrumentation/okhttp3/src/it/okhttp3_floor/README.md similarity index 80% rename from instrumentation/okhttp3/src/it/okhttp3_v3/README.md rename to instrumentation/okhttp3/src/it/okhttp3_floor/README.md index 29302d4bd5..918f382936 100644 --- a/instrumentation/okhttp3/src/it/okhttp3_v3/README.md +++ b/instrumentation/okhttp3/src/it/okhttp3_floor/README.md @@ -1,2 +1,2 @@ -# okhttp3_v3 +# okhttp3_floor This tests that TracingCallFactory can be used with okhttp3 <3.12 diff --git a/instrumentation/okhttp3/src/it/okhttp3_v3/pom.xml b/instrumentation/okhttp3/src/it/okhttp3_floor/pom.xml similarity index 96% rename from instrumentation/okhttp3/src/it/okhttp3_v3/pom.xml rename to instrumentation/okhttp3/src/it/okhttp3_floor/pom.xml index 7133dc030c..8b400d7e04 100644 --- a/instrumentation/okhttp3/src/it/okhttp3_v3/pom.xml +++ b/instrumentation/okhttp3/src/it/okhttp3_floor/pom.xml @@ -1,7 +1,7 @@ - 2.25.0 + 2.26.1 1.3.2 @@ -90,7 +90,7 @@ - 5.3.32 + 5.3.33 2.5.6 3.2.18.RELEASE @@ -106,14 +106,14 @@ 3.7.0 5.18.3 - 2.32.0 + 2.33.0 2.3.6 20.12.0 - 2.23.0 + 2.23.1 1.2.17 4.12.0 4.5.14 @@ -124,16 +124,16 @@ 1.57.2 3.22.3 - 4.1.107.Final + 4.1.108.Final 4.1.5 5.10.2 3.25.3 - 5.10.0 - 2.41 - 1.19.6 + 5.11.0 + 2.42 + 1.19.7 ${skipTests} @@ -144,7 +144,7 @@ 4.3 3.6.0 5.1.9 - 3.12.1 + 3.13.0 3.6.1 3.1.1 @@ -156,7 +156,7 @@ 3.6.3 3.3.0 3.0.1 - 3.3.0 + 3.3.1 3.2.5 1.6.13 @@ -687,7 +687,7 @@ maven-gpg-plugin - 3.1.0 + 3.2.2 sign-artifacts diff --git a/spring-beans/pom.xml b/spring-beans/pom.xml index 1302f20bf3..3e63313bc5 100644 --- a/spring-beans/pom.xml +++ b/spring-beans/pom.xml @@ -31,6 +31,8 @@ brave.spring.beans ${project.basedir}/.. + + ${spring25.version} @@ -99,7 +101,7 @@ org.springframework spring-beans - ${spring25.version} + ${spring-floor.version} MAIN jar diff --git a/spring-beans/src/it/spring25/README.md b/spring-beans/src/it/spring_floor/README.md similarity index 84% rename from spring-beans/src/it/spring25/README.md rename to spring-beans/src/it/spring_floor/README.md index a7d661ff38..3ce5215ded 100644 --- a/spring-beans/src/it/spring25/README.md +++ b/spring-beans/src/it/spring_floor/README.md @@ -1,2 +1,2 @@ -# spring25 +# spring_floor This tests that the brave.spring.beans package does not rely on Spring 3+ APIs. diff --git a/spring-beans/src/it/spring25/pom.xml b/spring-beans/src/it/spring_floor/pom.xml similarity index 96% rename from spring-beans/src/it/spring25/pom.xml rename to spring-beans/src/it/spring_floor/pom.xml index 90bb1762aa..51b53dabb0 100644 --- a/spring-beans/src/it/spring25/pom.xml +++ b/spring-beans/src/it/spring_floor/pom.xml @@ -20,9 +20,9 @@ 4.0.0 @project.groupId@ - spring25 + spring_floor @project.version@ - spring25 + spring_floor UTF-8 @@ -42,7 +42,7 @@ org.springframework spring-beans - @spring25.version@ + @spring-floor.version@ provided diff --git a/spring-beans/src/it/spring25/src/test/resources/log4j.properties b/spring-beans/src/it/spring_floor/src/test/resources/log4j.properties similarity index 100% rename from spring-beans/src/it/spring25/src/test/resources/log4j.properties rename to spring-beans/src/it/spring_floor/src/test/resources/log4j.properties