You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/04 07:32:01 UTC

[GitHub] [skywalking-java] wu-sheng commented on a diff in pull request #136: optimize UT

wu-sheng commented on code in PR #136:
URL: https://github.com/apache/skywalking-java/pull/136#discussion_r841440944


##########
apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/common/AtomicRangeIntegerTest.java:
##########
@@ -49,19 +49,22 @@ public void testGetAndIncrement() {
     @Test
     @Benchmark
     public void testGetAndIncrementV1Performance() {
-        ATOMIC_V1.getAndIncrement();
+        final int result = ATOMIC_V1.getAndIncrement();
+        Assert.assertTrue(result >= 0 && result <= 100);

Review Comment:
   Why do we need `Assert`? This is benchmark testing.



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

To unsubscribe, e-mail: dev-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org