fix testcase failed
This commit is contained in:
parent
3aa563324c
commit
61186fe51c
|
|
@ -79,7 +79,7 @@ public class ContextManagerTest {
|
|||
|
||||
@Test
|
||||
public void createMultipleEntrySpan() {
|
||||
ContextCarrier contextCarrier = new ContextCarrier().deserialize("#AQA=#AQA=4WcWe0tQNQA=|1|1|#127.0.0.1:8080|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA=");
|
||||
ContextCarrier contextCarrier = new ContextCarrier().deserialize("#AQA*#AQA*4WcWe0tQNQA*|1|1|#127.0.0.1:8080|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*");
|
||||
assertTrue(contextCarrier.isValid());
|
||||
|
||||
AbstractSpan firstEntrySpan = ContextManager.createEntrySpan("/testFirstEntry", contextCarrier);
|
||||
|
|
@ -202,7 +202,7 @@ public class ContextManagerTest {
|
|||
|
||||
@Test
|
||||
public void testTransform() throws InvalidProtocolBufferException {
|
||||
ContextCarrier contextCarrier = new ContextCarrier().deserialize("#AQA=#AQA=4WcWe0tQNQA=|3|1|#127.0.0.1:8080|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA=");
|
||||
ContextCarrier contextCarrier = new ContextCarrier().deserialize("#AQA*#AQA*4WcWe0tQNQA*|3|1|#127.0.0.1:8080|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*");
|
||||
assertTrue(contextCarrier.isValid());
|
||||
|
||||
AbstractSpan firstEntrySpan = ContextManager.createEntrySpan("/testFirstEntry", contextCarrier);
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ public class DubboInterceptorTest {
|
|||
@Test
|
||||
public void testProviderWithAttachment() throws Throwable {
|
||||
when(rpcContext.isConsumerSide()).thenReturn(false);
|
||||
when(rpcContext.getAttachment(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("#AQA=#AQA=4WcWe0tQNQA=|3|1|#192.168.1.8 :18002|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA=");
|
||||
when(rpcContext.getAttachment(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("#AQA*#AQA*4WcWe0tQNQA*|3|1|#192.168.1.8 :18002|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*");
|
||||
|
||||
dubboInterceptor.beforeMethod(enhancedInstance, "invoke", allArguments, argumentTypes, methodInterceptResult);
|
||||
dubboInterceptor.afterMethod(enhancedInstance, "invoke", allArguments, argumentTypes, result);
|
||||
|
|
@ -160,7 +160,7 @@ public class DubboInterceptorTest {
|
|||
when(rpcContext.isConsumerSide()).thenReturn(false);
|
||||
FieldSetter.setStaticValue(BugFixActive.class, "ACTIVE", true);
|
||||
|
||||
testParam.setTraceContext("#AQA=#AQA=4WcWe0tQNQA=|3|1|#192.168.1.8 :18002|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA=");
|
||||
testParam.setTraceContext("#AQA*#AQA*4WcWe0tQNQA*|3|1|#192.168.1.8 :18002|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*");
|
||||
|
||||
dubboInterceptor.beforeMethod(enhancedInstance, "invoke", allArguments, argumentTypes, methodInterceptResult);
|
||||
dubboInterceptor.afterMethod(enhancedInstance, "invoke", allArguments, argumentTypes, result);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class MotanProviderInterceptorTest {
|
|||
@Test
|
||||
public void testInvokerWithRefSegment() throws Throwable {
|
||||
HashMap attachments = new HashMap();
|
||||
attachments.put(Config.Plugin.Propagation.HEADER_NAME, "#AQA=#AQA=4WcWe0tQNQA=|3|1|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA=");
|
||||
attachments.put(Config.Plugin.Propagation.HEADER_NAME, "#AQA*#AQA*4WcWe0tQNQA*|3|1|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*");
|
||||
when(request.getAttachments()).thenReturn(attachments);
|
||||
|
||||
invokeInterceptor.beforeMethod(enhancedInstance, "execute", arguments, argumentType, null);
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public class ResinV3InterceptorTest {
|
|||
|
||||
@Test
|
||||
public void testWithSerializedContextData() throws Throwable {
|
||||
when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("#AQA=#AQA=4WcWe0tQNQA=|3|1|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA=");
|
||||
when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("#AQA*#AQA*4WcWe0tQNQA*|3|1|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*");
|
||||
|
||||
interceptor.beforeMethod(enhancedInstance, "service", arguments, argumentType, methodInterceptResult);
|
||||
interceptor.afterMethod(enhancedInstance, "service", arguments, argumentType, null);
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class ResinV4InterceptorTest {
|
|||
|
||||
@Test
|
||||
public void testWithSerializedContextData() throws Throwable {
|
||||
when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("#AQA=#AQA=4WcWe0tQNQA=|3|1|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA=");
|
||||
when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("#AQA*#AQA*4WcWe0tQNQA*|3|1|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*");
|
||||
|
||||
interceptor.beforeMethod(enhancedInstance, "service", arguments, argumentType, methodInterceptResult);
|
||||
interceptor.afterMethod(enhancedInstance, "service", arguments, argumentType, null);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class TomcatInterceptorTest {
|
|||
|
||||
@Test
|
||||
public void testWithSerializedContextData() throws Throwable {
|
||||
when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("#AQA=#AQA=4WcWe0tQNQA=|3|1|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA=");
|
||||
when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("#AQA*#AQA*4WcWe0tQNQA*|3|1|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*");
|
||||
|
||||
tomcatInterceptor.beforeMethod(enhancedInstance, "invoke", arguments, argumentType, methodInterceptResult);
|
||||
tomcatInterceptor.afterMethod(enhancedInstance, "invoke", arguments, argumentType, null);
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ public class SkywalkingSpanActivationTest {
|
|||
.withTag(Tags.PEER_HOST_IPV4.getKey(), "127.0.0.1").withTag(Tags.PEER_PORT.getKey(), 8080);
|
||||
startSpan();
|
||||
extractInterceptor.afterMethod(enhancedInstance, "extract",
|
||||
new Object[] {"#AQA=#AQA=4WcWe0tQNQA=|3|1|#127.0.0.1:8080|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA="}, new Class[] {String.class}, null);
|
||||
new Object[] {"#AQA*#AQA*4WcWe0tQNQA*|3|1|#127.0.0.1:8080|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*"}, new Class[] {String.class}, null);
|
||||
stopSpan();
|
||||
|
||||
TraceSegment tracingSegment = assertTraceSemgnets();
|
||||
|
|
@ -201,7 +201,7 @@ public class SkywalkingSpanActivationTest {
|
|||
.withTag(Tags.PEER_HOST_IPV4.getKey(), "127.0.0.1").withTag(Tags.PEER_PORT.getKey(), 8080);
|
||||
startSpan();
|
||||
extractInterceptor.afterMethod(enhancedInstance, "extract",
|
||||
new Object[] {"#AQA=#AQA=4WcWe0tQNQA=|3|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA="}, new Class[] {String.class}, null);
|
||||
new Object[] {"#AQA*#AQA*4WcWe0tQNQA*|3|#192.168.1.8:18002|#/portal/|#/testEntrySpan|#AQA*#AQA*Et0We0tQNQA*"}, new Class[] {String.class}, null);
|
||||
stopSpan();
|
||||
|
||||
TraceSegment tracingSegment = assertTraceSemgnets();
|
||||
|
|
|
|||
Loading…
Reference in New Issue