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 2020/08/13 21:10:53 UTC

[GitHub] [helix] zhangmeng916 commented on a change in pull request #1265: Change TestInstanceAutoJoin to adapt to cloud environment

zhangmeng916 commented on a change in pull request #1265:
URL: https://github.com/apache/helix/pull/1265#discussion_r470250522



##########
File path: helix-core/src/test/java/org/apache/helix/integration/paticipant/TestInstanceAutoJoin.java
##########
@@ -110,14 +108,23 @@ public void testAutoRegistrationShouldFailWhenWaitingResponse() throws Exception
         new MockParticipantManager(ZK_ADDR, CLUSTER_NAME, instance3);
     autoParticipant.syncStart();
 
-    Assert.assertTrue(null == manager.getHelixDataAccessor()
-        .getProperty(accessor.keyBuilder().liveInstance(instance3)));
+    // if the test is run in cloud environment, auto registration will succeed and live instance
+    // will be added, otherwise, auto registration will fail and instance config will not be
+    // populated. An exception will be thrown.
     try {
       manager.getConfigAccessor().getInstanceConfig(CLUSTER_NAME, instance3);

Review comment:
       This line is used to trigger the exception to be thrown as the instance config is not there.




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