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

 ##########
 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:
   There's only one PinotLLCRealtimeSegmentManager object in controller 
starter. In that test, there're 3 PinotLLCRealtimeSegmentManager objects. So in 
general, there should be 3 LeadControllerManager objects.
   I'd prefer mocking the object here instead of using a static one. Otherwise, 
it'd be good to add some comment for the static object.

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