Converted MilliSpan to Span. Removed the interface
This commit is contained in:
committed by
Marcin Grzejszczak
parent
b758008419
commit
d5b523d021
@@ -18,7 +18,7 @@ package org.springframework.cloud.sleuth.stream;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.autoconfigure.web.ServerProperties;
|
||||
import org.springframework.cloud.sleuth.MilliSpan;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
@@ -27,7 +27,8 @@ import java.util.Collections;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class ServerPropertiesHostLocatorTests {
|
||||
MilliSpan span = new MilliSpan(1, 3, "name", 1L, Collections.<Long>emptyList(), 2L, true, true, "process");
|
||||
Span span = new Span(1, 3, "name", 1L, Collections.<Long>emptyList(), 2L, true, true,
|
||||
"process");
|
||||
|
||||
@Test
|
||||
public void portDefaultsTo8080() {
|
||||
|
||||
@@ -16,19 +16,11 @@
|
||||
|
||||
package org.springframework.cloud.sleuth.stream;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.cloud.sleuth.MilliSpan;
|
||||
import org.springframework.cloud.sleuth.Sampler;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
import org.springframework.cloud.sleuth.Tracer;
|
||||
@@ -50,6 +42,12 @@ import org.springframework.integration.annotation.ServiceActivator;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*
|
||||
@@ -84,7 +82,7 @@ public class StreamSpanListenerTests {
|
||||
|
||||
@Test
|
||||
public void rpcAnnotations() {
|
||||
Span parent = MilliSpan.builder().traceId(1L).name("parent").remote(true)
|
||||
Span parent = Span.builder().traceId(1L).name("parent").remote(true)
|
||||
.build();
|
||||
Span context = this.tracer.joinTrace("child", parent);
|
||||
this.application.publishEvent(new ClientSentEvent(this, context));
|
||||
@@ -99,7 +97,7 @@ public class StreamSpanListenerTests {
|
||||
|
||||
@Test
|
||||
public void nullSpanName() {
|
||||
Span context = this.tracer.startTrace(null, (Sampler) null);
|
||||
Span context = this.tracer.startTrace(null, null);
|
||||
this.application.publishEvent(new ClientSentEvent(this, context));
|
||||
this.tracer.close(context);
|
||||
assertEquals(1, this.test.spans.size());
|
||||
@@ -128,7 +126,7 @@ public class StreamSpanListenerTests {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Sampler<?> defaultSampler() {
|
||||
public Sampler defaultSampler() {
|
||||
return new AlwaysSampler();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user