You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/10/04 00:12:35 UTC

[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #4677: Mocking out the LeadControllerManager in test

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org