Merge branch '2.2.x'

This commit is contained in:
Adrian Cole
2020-04-03 16:17:24 +08:00
35 changed files with 287 additions and 195 deletions

View File

@@ -28,8 +28,7 @@ import java.util.concurrent.ThreadFactory;
import brave.Tracer;
import brave.Tracing;
import brave.propagation.StrictScopeDecorator;
import brave.propagation.ThreadLocalCurrentTraceContext;
import brave.propagation.StrictCurrentTraceContext;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -52,11 +51,11 @@ public class SleuthRxJavaSchedulersHookTests {
List<String> threadsToIgnore = new ArrayList<>();
StrictCurrentTraceContext currentTraceContext = StrictCurrentTraceContext.create();
ArrayListSpanReporter reporter = new ArrayListSpanReporter();
Tracing tracing = Tracing.newBuilder()
.currentTraceContext(ThreadLocalCurrentTraceContext.newBuilder()
.addScopeDecorator(StrictScopeDecorator.create()).build())
Tracing tracing = Tracing.newBuilder().currentTraceContext(this.currentTraceContext)
.spanReporter(this.reporter).build();
Tracer tracer = this.tracing.tracer();
@@ -65,6 +64,7 @@ public class SleuthRxJavaSchedulersHookTests {
public void clean() {
this.tracing.close();
this.reporter.clear();
this.currentTraceContext.close();
}
@BeforeEach