Trying to make tests less brittle
This commit is contained in:
@@ -23,6 +23,7 @@ import brave.handler.MutableSpan;
|
||||
import brave.propagation.TraceContext;
|
||||
import brave.sampler.Sampler;
|
||||
import org.assertj.core.api.BDDAssertions;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import zipkin2.reporter.Reporter;
|
||||
|
||||
@@ -39,9 +40,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
@SpringBootTest(
|
||||
classes = FinishedSpanHandlerTests.FinishedSpanHandlerAspectTestsConfig.class,
|
||||
webEnvironment = NONE)
|
||||
@SpringBootTest(classes = FinishedSpanHandlerTests.FinishedSpanHandlerAspectTestsConfig.class, webEnvironment = NONE)
|
||||
public class FinishedSpanHandlerTests {
|
||||
|
||||
@Autowired
|
||||
@@ -50,6 +49,11 @@ public class FinishedSpanHandlerTests {
|
||||
@Autowired
|
||||
Tracer tracer;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
this.reporter.clear();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_adjust_span_twice_before_reporting() {
|
||||
Span hello = this.tracer.nextSpan().name("hello").start();
|
||||
|
||||
Reference in New Issue
Block a user