You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/06/21 03:21:07 UTC

[GitHub] [skywalking] zifeihan edited a comment on pull request #4952: Don't trace anything if the backend is not available.

zifeihan edited a comment on pull request #4952:
URL: https://github.com/apache/skywalking/pull/4952#issuecomment-647073140


   > I don't remember there is segment size test.
   
   like this,
   org.apache.skywalking.apm.agent.core.remote.TraceSegmentServiceClientTest#testSendTraceSegmentWithoutException
   ```
       public void testSendTraceSegmentWithoutException() throws InvalidProtocolBufferException {
           grpcServerRule.getServiceRegistry().addService(serviceImplBase);
   
           AbstractSpan firstEntrySpan = ContextManager.createEntrySpan("/testFirstEntry", null);
           firstEntrySpan.setComponent(ComponentsDefine.TOMCAT);
           Tags.HTTP.METHOD.set(firstEntrySpan, "GET");
           Tags.URL.set(firstEntrySpan, "127.0.0.1:8080");
           SpanLayer.asHttp(firstEntrySpan);
           ContextManager.stopSpan();
   
           serviceClient.consume(storage.getTraceSegments());
   
           assertThat(upstreamSegments.size(), is(1));
           SegmentObject traceSegmentObject = upstreamSegments.get(0);
           assertThat(traceSegmentObject.getSpans(0).getRefsCount(), is(0));
           assertThat(traceSegmentObject.getSpansCount(), is(1));
   
           SpanObject spanObject = traceSegmentObject.getSpans(0);
           assertThat(spanObject.getSpanType(), is(SpanType.Entry));
           assertThat(spanObject.getSpanId(), is(0));
           assertThat(spanObject.getParentSpanId(), is(-1));
       }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org