mcvsubbu commented on a change in pull request #4677: Mocking out the 
LeadControllerManager in test
URL: https://github.com/apache/incubator-pinot/pull/4677#discussion_r331303404
 
 

 ##########
 File path: 
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManagerTest.java
 ##########
 @@ -1321,8 +1322,7 @@ protected 
FakePinotLLCRealtimeSegmentManager(PinotHelixResourceManager pinotHeli
 
     protected FakePinotLLCRealtimeSegmentManager(PinotHelixResourceManager 
pinotHelixResourceManager,
         List<String> existingLLCSegments, ControllerMetrics controllerMetrics) 
{
-      super(pinotHelixResourceManager, CONTROLLER_CONF, controllerMetrics,
-          new 
LeadControllerManager(pinotHelixResourceManager.getHelixZkManager(), 
controllerMetrics));
+      super(pinotHelixResourceManager, CONTROLLER_CONF, controllerMetrics, 
_mockLeadControllerManager);
 
 Review comment:
   The LeadControllerManager object is never used in the code path that the 
test goes through. If we refactor the code so that it gets used, then we will 
need to mock each one of them with its own behavior. I can add a comment saying 
so.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to