kezhenxu94 edited a comment on pull request #5129:
URL: https://github.com/apache/skywalking/pull/5129#issuecomment-661010206


   @stalary 
   
   - add a new test case to verify the JVM-related metrics
   - add a expected file (`expected/simple/jvmThreadMetrics.yml`)
   
   here is a skeleton
   
   ```java
   
       @RetryableTest
       void jvmThreadMetrics() throws Exception {
           // query the jvm thread metrics
   
           
load("expected/simple/jvmThreadMetrics.yml").as(JvmThreadMetricsMatcher.class).verify(jvmThreadMetrics);
       }
   ```
   
   I don't think it's possible to verify the exact thread count, active thread 
count, etc, so verifying that they are > 0 should be enough
   
   `verifyInstancesMetrics` in the `SimpleE2E` is a good example if you don't 
want to add a `expected/simple/jvmThreadMetrics.yml` file and want to verify in 
Java codes


----------------------------------------------------------------
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]


Reply via email to