You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/02/02 23:40:08 UTC

[GitHub] [helix] narendly commented on a change in pull request #1627: Fix ZkAddress null case for TaskStateModelFactory

narendly commented on a change in pull request #1627:
URL: https://github.com/apache/helix/pull/1627#discussion_r569007256



##########
File path: helix-core/src/test/java/org/apache/helix/task/TestTaskStateModelFactory.java
##########
@@ -86,6 +90,15 @@ public void testConfigAccessorCreationMultiZk() throws Exception {
         .getTargetThreadPoolSize(zkClient, anyParticipantManager.getClusterName(),
             anyParticipantManager.getInstanceName()), TEST_TARGET_TASK_THREAD_POOL_SIZE);
 
+    // Turn off multiZk mode in System config, and remove zkAddress
+    System.setProperty(SystemPropertyKeys.MULTI_ZK_ENABLED, "false");
+    HelixManager participantManager = Mockito.spy(anyParticipantManager);
+    when(participantManager.getMetadataStoreConnectionString()).thenReturn(null);
+    zkClient = TaskStateModelFactory.createZkClient(participantManager);
+    Assert.assertEquals(TaskUtil

Review comment:
       Another good check to add here is `zkClient isinstanceof FederatedZkClient`?




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



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