Removes unnecessary dependencies

We had some out-of-date comments, and some deps that were too heavy.
This commit is contained in:
Adrian Cole
2018-04-28 17:19:39 +08:00
committed by Adrian Cole
parent 7936b03687
commit 3e48dec901
6 changed files with 27 additions and 31 deletions

View File

@@ -273,8 +273,6 @@
<spring-cloud-netflix.version>2.0.0.BUILD-SNAPSHOT</spring-cloud-netflix.version>
<spring-cloud-openfeign.version>2.0.0.BUILD-SNAPSHOT</spring-cloud-openfeign.version>
<brave.version>4.19.0</brave.version>
<!-- Version set until zipkin-junit gets defined in Brave BOM -->
<zipkin.version>2.7.0</zipkin.version>
<spring-security-boot-autoconfigure.version>2.0.0.RELEASE</spring-security-boot-autoconfigure.version>
</properties>

View File

@@ -213,6 +213,8 @@
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin</artifactId>
<!-- misaligned intentionally https://github.com/spring-projects/spring-boot/issues/10778-->
<version>2.8.0</version>
<optional>true</optional>
</dependency>
<!-- BRAVE -->

View File

@@ -79,13 +79,7 @@
<artifactId>spring-cloud-starter-sleuth</artifactId>
<version>${project.version}</version>
</dependency>
<!-- ZIPKIN -->
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin</artifactId>
<!-- misaligned intentionally https://github.com/spring-projects/spring-boot/issues/10778-->
<version>2.7.0</version>
</dependency>
<!-- BRAVE -->
<dependency>
<groupId>io.opentracing.brave</groupId>
<artifactId>brave-opentracing</artifactId>

View File

@@ -73,7 +73,7 @@
<dependency>
<groupId>io.zipkin.zipkin2</groupId>
<artifactId>zipkin</artifactId>
<version>2.7.1</version>
<version>2.8.1</version>
</dependency>
</dependencies>
</dependencyManagement>

View File

@@ -131,9 +131,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-junit</artifactId>
<version>${zipkin.version}</version>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>3.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -141,20 +141,6 @@
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<!-- otherwise spring boot's version of okhttp kicks zipkin-junit's deps out of alignment -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>3.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.zipkin.zipkin2</groupId>
<artifactId>zipkin</artifactId>
<type>test-jar</type>
<version>${zipkin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>

View File

@@ -23,15 +23,31 @@ import org.junit.Rule;
import org.junit.Test;
import org.springframework.web.client.RestTemplate;
import zipkin2.Call;
import zipkin2.Endpoint;
import zipkin2.Span;
import static java.util.stream.Collectors.toList;
import static org.assertj.core.api.Assertions.assertThat;
import static zipkin2.TestObjects.CLIENT_SPAN;
import static zipkin2.TestObjects.UTF_8;
import static zipkin2.codec.SpanBytesEncoder.JSON_V2;
public class RestTemplateSenderTest {
static final Span SPAN = Span.newBuilder()
.traceId("7180c278b62e8f6a216a2aea45d08fc9")
.parentId("6b221d5bc9e6496c")
.id("5b4185666d50f68b")
.name("get /backend")
.kind(Span.Kind.SERVER)
.shared(true)
.localEndpoint(Endpoint.newBuilder()
.serviceName("backend")
.ip("192.168.99.101")
.port(9000)
.build())
.timestamp(1472470996250000L)
.duration(100000L)
.putTag("http.method", "GET")
.putTag("http.path", "/backend")
.build();
@Rule public MockWebServer server = new MockWebServer();
@@ -42,10 +58,10 @@ public class RestTemplateSenderTest {
@Test public void jsonIsNormal() throws Exception {
server.enqueue(new MockResponse());
send(CLIENT_SPAN).execute();
send(SPAN).execute();
assertThat(server.takeRequest().getBody().readUtf8())
.isEqualTo("[" + new String(JSON_V2.encode(CLIENT_SPAN), UTF_8) + "]");
.isEqualTo("[" + new String(JSON_V2.encode(SPAN), "UTF-8") + "]");
}
Call<Void> send(Span... spans) {