narendly commented on a change in pull request #369: Add the workaround fix for 
assigning partitions when instance weight …
URL: https://github.com/apache/helix/pull/369#discussion_r310154419
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/controller/rebalancer/strategy/crushMapping/CardDealingAdjustmentAlgorithmV2.java
 ##########
 @@ -55,6 +74,27 @@ public CardDealingAdjustmentAlgorithmV2(Topology topology, 
int replica, Mode mod
     }
   }
 
+  // expose internal fields only for testing purpose
 
 Review comment:
   As I mentioned in another PR, one trick you can use is to create a 
MockCardDealingAdjustmentAlgorithmV2 that extends this class and that contains 
these methods. That way you should be able to access all protected fields, and 
use the mock class for unit 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to