Ejemplo n.º 1
0
 @Test(description = "endTrace后调用newSpan等,warning日志中记录了NullpointException,并且被正确捕获")
 public void testService3() {
   Hunter.startTracer(ip, port, serviceName, spanCollector, null, 1L, 11L, false);
   //		firstService.serviceA();
   Hunter.endTrace();
   firstService.serviceA();
 }
Ejemplo n.º 2
0
 @Test(description = "traceId不为空,parentId不为空,isSample为真的情况下,跟踪,并且打印传入的traceId")
 public void testService4() {
   Hunter.startTracer(ip, port, serviceName, spanCollector, null, 1L, 11L, true);
   firstService.serviceA();
   Hunter.endTrace();
 }
Ejemplo n.º 3
0
 @Test(description = "traceId不为空,parentId不为空,isSample为假的情况下,不跟踪")
 public void testService2() {
   Hunter.startTracer(ip, port, serviceName, spanCollector, null, 1L, 11L, false);
   firstService.serviceA();
   Hunter.endTrace();
 }
Ejemplo n.º 4
0
 @Test(description = "traceId, parentId,isSample都是null, 日志正常,并且打印的traceId是非默认traceId")
 public void testService1() {
   Hunter.startTracer(ip, port, serviceName, spanCollector, null);
   firstService.serviceA();
   Hunter.endTrace();
 }