wu-sheng commented on a change in pull request #4244: Drop support of protocol 
v1 (sw3)
URL: https://github.com/apache/skywalking/pull/4244#discussion_r367717648
 
 

 ##########
 File path: 
apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/ContextCarrierV2HeaderTest.java
 ##########
 @@ -107,37 +58,19 @@ public void testSerializeV2Header() {
         CarrierItem next = contextCarrier.items();
         while (next.hasNext()) {
             next = next.next();
-            if (next.getHeadKey().equals("sw3")) {
-                Assert.assertEquals("", next.getHeadValue());
-            } else if (next.getHeadKey().equals("sw6")) {
-                /**
-                 * 
sampleFlag-traceId-segmentId-spanId-parentAppInstId-entryAppInstId-peerHost-entryEndpoint-parentEndpoint
-                 *
-                 * "1-3.4.5-1.2.3-4-1-1-#127.0.0.1:8080-#/portal-123"
-                 */
-                
Assert.assertEquals("1-My40LjU=-MS4yLjM=-4-1-1-IzEyNy4wLjAuMTo4MDgw-Iy9wb3J0YWw=-MTIz",
 next.getHeadValue());
-            } else {
-                Assert.fail("unexpected key");
-            }
+            /*
+             * 
sampleFlag-traceId-segmentId-spanId-parentAppInstId-entryAppInstId-peerHost-entryEndpoint-parentEndpoint
+             *
+             * "1-3.4.5-1.2.3-4-1-1-#127.0.0.1:8080-#/portal-123"
+             */
+            
Assert.assertEquals("1-My40LjU=-MS4yLjM=-4-1-1-IzEyNy4wLjAuMTo4MDgw-Iy9wb3J0YWw=-MTIz",
 next.getHeadValue());
         }
 
-        Config.Agent.ACTIVE_V1_HEADER = true;
-        try {
-            next = contextCarrier.items();
-            while (next.hasNext()) {
-                next = next.next();
-                if (next.getHeadKey().equals("sw3")) {
-                    
Assert.assertEquals("1.2.3|4|1|1|#127.0.0.1:8080|#/portal|123|3.4.5", 
next.getHeadValue());
-                } else if (next.getHeadKey().equals("sw6")) {
-                    //TODO, no BASE64
-                    
Assert.assertEquals("1-My40LjU=-MS4yLjM=-4-1-1-IzEyNy4wLjAuMTo4MDgw-Iy9wb3J0YWw=-MTIz",
 next.getHeadValue());
-                } else {
-                    Assert.fail("unexpected key");
-                }
-            }
-
-        } finally {
-            Config.Agent.ACTIVE_V1_HEADER = false;
+        next = contextCarrier.items();
+        while (next.hasNext()) {
+            next = next.next();
+            //TODO, no BASE64
 
 Review comment:
   What is this TODO for?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to