Ensure sampled traces are exportable in test

This commit is contained in:
Dave Syer
2016-02-02 08:34:36 +00:00
parent 8918057a7f
commit 948d9e7886

View File

@@ -44,7 +44,7 @@ import org.springframework.context.ApplicationEventPublisher;
/**
* @author Spencer Gibb
*/
public class DefaultTraceManagerTests {
public class DefaultTracerTests {
public static final String CREATE_SIMPLE_TRACE = "createSimpleTrace";
public static final String IMPORTANT_WORK_1 = "important work 1";
@@ -107,6 +107,13 @@ public class DefaultTraceManagerTests {
assertThat(span.isExportable(), is(false));
}
@Test
public void exportable() {
DefaultTracer tracer = new DefaultTracer(new AlwaysSampler(), new Random(), this.publisher);
Span span = tracer.startTrace(CREATE_SIMPLE_TRACE);
assertThat(span.isExportable(), is(true));
}
@Test
public void exportableInheritedFromParent() {
DefaultTracer tracer = new DefaultTracer(new AlwaysSampler(), new Random(), this.publisher);