bsglz commented on a change in pull request #2044: URL: https://github.com/apache/hbase/pull/2044#discussion_r456748462
########## File path: hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancer.java ########## @@ -284,6 +284,25 @@ public void testLocalityCost() throws Exception { } } + @Test + public void testMoveCostMultiplier() throws Exception { + Configuration conf = HBaseConfiguration.create(); + StochasticLoadBalancer.CostFunction + costFunction = new StochasticLoadBalancer.MoveCostFunction(conf); + BaseLoadBalancer.Cluster cluster = mockCluster(clusterStateMocks[0]); + costFunction.init(cluster); + costFunction.cost(); + assertEquals(7, costFunction.getMultiplier(), 0.01); Review comment: > Can we please avoid @VisibleForTesting and make them private? On the other hand, use default value directly in test cases. If default values change here and test is not updated, it is anyways going to fail. Discussed about it above with viraj. ---------------------------------------------------------------- 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: us...@infra.apache.org