Skip to content

Commit

Permalink
Speeds up dubbo tests, aligns conventions and bumps deps (#1432)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
codefromthecrypt authored Apr 10, 2024
1 parent ef6fbbd commit 170c79f
Show file tree
Hide file tree
Showing 47 changed files with 88 additions and 83 deletions.
2 changes: 1 addition & 1 deletion brave-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@

<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.2</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
2 changes: 1 addition & 1 deletion brave/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
<version>1.12.3</version>
<version>1.12.5</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<main.basedir>${project.basedir}/../..</main.basedir>
<jmh.version>1.37</jmh.version>
<!-- Note: versions above 2.2 move to jakarta package -->
<undertow-servlet.version>2.2.30.Final</undertow-servlet.version>
<undertow-servlet.version>2.2.31.Final</undertow-servlet.version>
</properties>

<!-- All dependencies are marked test, because benchmarks are a form of test.
Expand All @@ -54,7 +54,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-xray-recorder-sdk-core</artifactId>
<version>2.15.1</version>
<version>2.15.2</version>
<scope>test</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion instrumentation/dubbo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<main.basedir>${project.basedir}/../..</main.basedir>

<dubbo.version>3.3.0-beta.1</dubbo.version>
<dubbo.version>3.3.0-beta.2</dubbo.version>
<!-- add opens to avoid below in JRE 21:
com.alibaba.com.caucho.hessian.io.JavaSerializer -->
<maven-failsafe-plugin.argLine>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -42,16 +41,17 @@ 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));
service.setProtocol(new ProtocolConfig("dubbo", PickUnusedPort.get()));
}

public void initService() {

service.setInterface(GreeterService.class);
service.setRef((method, parameterTypes, args) -> {
requestQueue.add(extractor.extract(RpcContext.getContext().getAttachments()));
Expand Down
6 changes: 3 additions & 3 deletions instrumentation/grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>

<old-grpc.version>1.2.0</old-grpc.version>
<old-protoc.version>3.2.0</old-protoc.version>
<floor-grpc.version>1.2.0</floor-grpc.version>
<floor-protoc.version>3.2.0</floor-protoc.version>

<!-- disable mutability warning as TagContextBinaryMarshaller intentionally returns mixed -->
<errorprone.args>-Xep:MixedMutabilityReturnType:OFF</errorprone.args>
Expand Down Expand Up @@ -183,7 +183,7 @@
<DynamicDependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
<version>${old-grpc.version}</version>
<version>${floor-grpc.version}</version>
<repositoryType>MAIN</repositoryType>
<type>jar</type>
</DynamicDependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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
Expand All @@ -20,9 +20,9 @@
<modelVersion>4.0.0</modelVersion>

<groupId>@project.groupId@</groupId>
<artifactId>grpc12</artifactId>
<artifactId>grpc_floor</artifactId>
<version>@project.version@</version>
<name>grpc12</name>
<name>grpc_floor</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -42,7 +42,7 @@
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
<version>@old-grpc.version@</version>
<version>@floor-grpc.version@</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package brave.grpc12;
package brave.grpc_floor;

import brave.grpc.BaseITTracingClientInterceptor;
import io.grpc.ManagedChannelBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package brave.grpc12;
package brave.grpc_floor;

import brave.grpc.BaseITTracingServerInterceptor;
import io.grpc.ManagedChannelBuilder;
Expand Down
6 changes: 3 additions & 3 deletions instrumentation/httpclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<main.basedir>${project.basedir}/../..</main.basedir>

<old-httpclient.version>4.3.6</old-httpclient.version>
<floor-httpclient.version>4.3.6</floor-httpclient.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -82,14 +82,14 @@
<DynamicDependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${old-httpclient.version}</version>
<version>${floor-httpclient.version}</version>
<repositoryType>MAIN</repositoryType>
<type>jar</type>
</DynamicDependency>
<DynamicDependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
<version>${old-httpclient.version}</version>
<version>${floor-httpclient.version}</version>
<repositoryType>MAIN</repositoryType>
<type>jar</type>
</DynamicDependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# httpclient_v43
# httpclient_floor
This tests that TracingHttpClientBuilder can be used with httpclient 4.3
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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
Expand All @@ -20,9 +20,9 @@
<modelVersion>4.0.0</modelVersion>

<groupId>@project.groupId@</groupId>
<artifactId>httpclient_v43</artifactId>
<artifactId>httpclient_floor</artifactId>
<version>@project.version@</version>
<name>httpclient_v43</name>
<name>httpclient_floor</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -42,12 +42,12 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>@old-httpclient.version@</version>
<version>@floor-httpclient.version@</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
<version>@old-httpclient.version@</version>
<version>@floor-httpclient.version@</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package brave.httpclient_v43;
package brave.httpclient_floor;

class ITTracingCachingHttpClientBuilder
extends brave.httpclient.ITTracingCachingHttpClientBuilder {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package brave.httpclient_v43;
package brave.httpclient_floor;

class ITTracingHttpClientBuilder extends brave.httpclient.ITTracingHttpClientBuilder {
}
4 changes: 2 additions & 2 deletions instrumentation/kafka-clients/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<main.basedir>${project.basedir}/../..</main.basedir>

<old-kafka-clients.version>1.0.0</old-kafka-clients.version>
<kafka-clients-floor.version>1.0.0</kafka-clients-floor.version>

<!-- disable errorprone override warning as we do this intentionally to allow old clients -->
<errorprone.args>-Xep:MissingOverride:OFF</errorprone.args>
Expand Down Expand Up @@ -92,7 +92,7 @@
<DynamicDependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${old-kafka-clients.version}</version>
<version>${kafka-clients-floor.version}</version>
<repositoryType>MAIN</repositoryType>
<type>jar</type>
</DynamicDependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# kafka1
# kafka_floor
This tests that KafkaPropagation can be used with kafka-client v<2
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<modelVersion>4.0.0</modelVersion>

<groupId>@project.groupId@</groupId>
<artifactId>kafka-clients-kafka1</artifactId>
<artifactId>kafka-clients-kafka_floor</artifactId>
<version>@project.version@</version>
<name>kafka-clients-kafka1</name>
<name>kafka-clients-kafka_floor</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -42,7 +42,7 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>@old-kafka-clients.version@</version>
<version>@kafka-clients-floor.version@</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 {
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class KafkaContainer extends GenericContainer<KafkaContainer> {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class KafkaContainer extends GenericContainer<KafkaContainer> {
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);
Expand Down
6 changes: 3 additions & 3 deletions instrumentation/okhttp3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

<main.basedir>${project.basedir}/../..</main.basedir>
<!-- Last version before Call.timeout was added -->
<old-okhttp.version>3.11.0</old-okhttp.version>
<retrofit.version>2.9.0</retrofit.version>
<okhttp-floor.version>3.11.0</okhttp-floor.version>
<retrofit.version>2.11.0</retrofit.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -83,7 +83,7 @@
<DynamicDependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>${old-okhttp.version}</version>
<version>${okhttp-floor.version}</version>
<repositoryType>MAIN</repositoryType>
<type>jar</type>
</DynamicDependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# okhttp3_v3
# okhttp3_floor
This tests that TracingCallFactory can be used with okhttp3 <3.12
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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
Expand All @@ -20,9 +20,9 @@
<modelVersion>4.0.0</modelVersion>

<groupId>@project.groupId@</groupId>
<artifactId>okhttp3_v3</artifactId>
<artifactId>okhttp3_floor</artifactId>
<version>@project.version@</version>
<name>okhttp3_v3</name>
<name>okhttp3_floor</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -42,7 +42,7 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>@old-okhttp.version@</version>
<version>@okhttp-floor.version@</version>
<scope>provided</scope>
</dependency>

Expand Down
Loading

0 comments on commit 170c79f

Please sign in to comment.