xyuanlu commented on code in PR #2841:
URL: https://github.com/apache/helix/pull/2841#discussion_r1687119738


##########
helix-gateway/src/main/java/org/apache/helix/gateway/service/HelixGatewayService.java:
##########
@@ -28,15 +28,12 @@ public void start() {
     System.out.println("Starting Helix Gateway Service");
   }
 
-  public void registerParticipant(MockApplication mockApplication) {
-    HelixManager manager = 
_participantsMap.computeIfAbsent(mockApplication.getClusterName(),
-        k -> new 
ConcurrentHashMap<>()).computeIfAbsent(mockApplication.getInstanceName(),
-        k -> 
HelixManagerFactory.getZKHelixManager(mockApplication.getClusterName(),
-            mockApplication.getInstanceName(), InstanceType.PARTICIPANT, 
_zkAddress));
-    manager.getStateMachineEngine().registerStateModelFactory("OnlineOffline",
-        new HelixGatewayOnlineOfflineStateModelFactory(_clusterManager));
+  public void registerParticipant() {
+    HelixManager manager = new ZKHelixManager("clusterName", "instanceName", 
InstanceType.PARTICIPANT, _zkAddress);
+    manager.getStateMachineEngine()
+        .registerStateModelFactory("OnlineOffline", new 
HelixGatewayOnlineOfflineStateModelFactory(_clusterManager));

Review Comment:
   TFTR updatred.



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

To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to