use of com.uber.jaeger.filters.jaxrs2.ServerRequestCarrier in project jaeger-client-java by jaegertracing.
the class FilterIntegrationTest method testExtractorReturnsNullWhenTracerStateHeaderIsMissing.
/*
* This test exists because opentracing's convention around missing tracer
* state headers may change to stop supporting the automatic creation of
* building a span.
*/
@Test
public void testExtractorReturnsNullWhenTracerStateHeaderIsMissing() {
ContainerRequestContext reqContext = mock(ContainerRequestContext.class);
given(reqContext.getHeaders()).willReturn(new MultivaluedHashMap<String, String>());
ServerRequestCarrier carrier = new ServerRequestCarrier(reqContext);
SpanContext spanCtx = tracer.extract(Format.Builtin.HTTP_HEADERS, carrier);
assertNull(spanCtx);
}
Aggregations