wujimin commented on a change in pull request #628: [SCB-385] Metrics publisher 
switch to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/628#discussion_r178473352
 
 

 ##########
 File path: 
demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
 ##########
 @@ -96,20 +96,14 @@ public static void run() {
     }
 
     //0.5.0 later version metrics integration test
-    try {
-      Thread.sleep(1000);
-      @SuppressWarnings("unchecked")
-      Map<String, Double> metrics = restTemplate.getForObject(prefix + 
"/metrics", Map.class);
-
-      TestMgr
-          .check(true, metrics.get("jvm(name=heapUsed,statistic=gauge)") != 0);
-      TestMgr.check(true, metrics.size() > 0);
-      TestMgr.check(true,
-          metrics.get(
-              
"servicecomb.invocation(operation=springmvc.codeFirst.saySomething,role=producer,stage=total,statistic=count,status=200)")
 >= 0);
-    } catch (Exception e) {
-      TestMgr.check("true", "false");
-    }
+    @SuppressWarnings("unchecked")
+    Map<String, Double> metrics = restTemplate.getForObject(prefix + 
"/metrics", Map.class);
+
+//    TestMgr.check(true, metrics.get("jvm(name=heapUsed,statistic=gauge)") != 
0);
+    TestMgr.check(true, metrics.size() > 0);
+    TestMgr.check(true,
+        metrics.get(
+            
"servicecomb.invocation(operation=springmvc.codeFirst.saySomething,role=PRODUCER,stage=total,statistic=count,status=200,transport=highway)")
 >= 0);
 
 Review comment:
   role value is from InvocationType enum, i think we should follow the rule 
with other features that use invocationType directly

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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