public abstract class TraceFilterTests extends Object implements TestTracingAwareSupplier
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.cloud.sleuth.CurrentTraceContext |
currentTraceContext |
protected javax.servlet.Filter |
filter |
protected org.springframework.mock.web.MockFilterChain |
filterChain |
protected org.springframework.mock.web.MockHttpServletRequest |
request |
protected org.springframework.mock.web.MockHttpServletResponse |
response |
protected TestSpanHandler |
spans |
protected org.springframework.cloud.sleuth.Tracer |
tracer |
| Constructor and Description |
|---|
TraceFilterTests() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcleanUpTracing, tracerTestprotected org.springframework.cloud.sleuth.Tracer tracer
protected org.springframework.cloud.sleuth.CurrentTraceContext currentTraceContext
protected javax.servlet.Filter filter
protected TestSpanHandler spans
protected org.springframework.mock.web.MockHttpServletRequest request
protected org.springframework.mock.web.MockHttpServletResponse response
protected org.springframework.mock.web.MockFilterChain filterChain
@BeforeEach public void init()
public org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder builder()
@AfterEach public void cleanup()
protected javax.servlet.Filter neverSampleFilter()
@Test
public void continuesATraceWhenSpanNotSampled()
throws Exception
Exception@Test
public void continuesSpanInRequestAttr()
throws Exception
Exception@Test
public void closesSpanInRequestAttrIfStatusCodeNotSuccessful()
throws Exception
Exception@Test
public void doesntDetachASpanIfStatusCodeNotSuccessfulAndRequestWasProcessed()
throws Exception
Exception@Test
public void continuesSpanFromHeaders()
throws Exception
Exceptionpublic abstract org.springframework.cloud.sleuth.http.HttpServerHandler httpServerHandler()
@Test
public void shouldAnnotateSpanWithErrorWhenExceptionIsThrown()
throws Exception
Exception@Test
public void detachesSpanWhenResponseStatusIsNot2xx()
throws Exception
Exception@Test
public void closesSpanWhenResponseStatusIs2xx()
throws Exception
Exception@Test
public void closesSpanWhenResponseStatusIs3xx()
throws Exception
Exception@Test
public void returns400IfSpanIsMalformedAndCreatesANewSpan()
throws Exception
Exception@Test
public void returns200IfSpanParentIsMalformedAndCreatesANewSpan()
throws Exception
Exception@Test
public void usesSamplingMechanismWhenIncomingTraceIsMalformed()
throws Exception
Exception@Test
public void shouldSetTraceKeysForAnUntracedRequest()
throws Exception
Exceptionpublic void verifyParentSpanHttpTags()
Copyright © 2023 Pivotal Software, Inc.. All rights reserved.