You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/20 04:04:38 UTC

[GitHub] [dubbo] 24kpure commented on a change in pull request #8519: fix ShortestResponseLoadBalanceTest failure

24kpure commented on a change in pull request #8519:
URL: https://github.com/apache/dubbo/pull/8519#discussion_r692645291



##########
File path: dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ShortestResponseLoadBalanceTest.java
##########
@@ -97,14 +97,13 @@ public void testSelectByResponse() throws NoSuchFieldException, IllegalAccessExc
             }
         }
         Map<Invoker<LoadBalanceBaseTest>, Integer> weightMap = weightInvokersSR.stream()
-                .collect(Collectors.toMap(Function.identity(), e -> Integer.valueOf(e.getUrl().getParameter("weight"))));
+            .collect(Collectors.toMap(Function.identity(), e -> Integer.valueOf(e.getUrl().getParameter("weight"))));
         Integer totalWeight = weightMap.values().stream().reduce(0, Integer::sum);
-        // max deviation 10%
+        // max deviation 12.5%
         int expectWeightValue = loop / totalWeight;
-        int maxDeviation = expectWeightValue / 10;
+        int maxDeviation = expectWeightValue / 8;

Review comment:
       Good idea!




-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org