Package com.github.kristofa.brave

Examples of com.github.kristofa.brave.SpanId


    }

    @Test
    public void testExecuteProceedThrowsException() throws Exception {

        final SpanId mockSpanId = mock(SpanId.class);
        when(mockSpanId.getTraceId()).thenReturn(TRACE_ID);
        when(mockSpanId.getSpanId()).thenReturn(SPAN_ID);
        when(mockSpanId.getParentSpanId()).thenReturn(PARENT_SPAN_ID);

        when(mockClientTracer.startNewSpan(PATH)).thenReturn(mockSpanId);
        final IllegalStateException exception = new IllegalStateException("Test exception");
        when(mockExecutionContext.proceed()).thenThrow(exception);
View Full Code Here


    public void shouldHandleMissingParentId() throws Exception {
        validateUsingSpan(mockSpan(-123L, 456L, null));
    }

    private SpanId mockSpan(final long traceId, final long spanId, final Long parentSpanId) {
        final SpanId mockedSpan = mock(SpanId.class);
        when(mockedSpan.getTraceId()).thenReturn(traceId);
        when(mockedSpan.getSpanId()).thenReturn(spanId);
        when(mockedSpan.getParentSpanId()).thenReturn(parentSpanId);
        return mockedSpan;
    }
View Full Code Here

TOP

Related Classes of com.github.kristofa.brave.SpanId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.