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 05:23:28 UTC

[GitHub] [helix] zhangmeng916 opened a new pull request #1265: Change TestInstanceAutoJoin to adapt to cloud environment

zhangmeng916 opened a new pull request #1265:
URL: https://github.com/apache/helix/pull/1265


   ### Issues
   
   - [X] My PR addresses the following Helix issues and references them in the PR description:
   
   Fixed #1264 
   
   ### Description
   
   - [X] Here are some details about my PR, including screenshots of any UI changes:
   
   The previous test testAutoRegistrationShouldFailWhenWaitingRespons in TestInstanceAutoJoin will fail in github test, although it always pass locally. The reason is that the test was written with the assumption that it is only run in on-prem environment and auto registration will fail with no cloud response returned. However, github tests are run in cloud environment, and the auto registration will succeed. This PR changed the test to make it adapt to both on-prem and cloud environment. 
   
   ### Tests
   
   - [X] The following is the result of the "mvn test" command on the appropriate module:
   
   
   ### Documentation (Optional)
   
   - In case of new functionality, my PR adds documentation in the following wiki page:
   
   (Link the GitHub wiki you added)
   
   ### Commits
   
   - My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Code Quality
   
   - My diff has been formatted using helix-style.xml 
   (helix-style-intellij.xml if IntelliJ IDE is used)
   


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


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

Posted by GitBox <gi...@apache.org>.
zhangmeng916 commented on pull request #1265:
URL: https://github.com/apache/helix/pull/1265#issuecomment-673729460


   This PR is ready to merge, approved by @kaisun2000 
   Final commit message: 
   Change TestInstanceAutoJoin to adapt to cloud environment


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


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

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on a change in pull request #1265:
URL: https://github.com/apache/helix/pull/1265#discussion_r470263996



##########
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:
       Got it. You are right.




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


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

Posted by GitBox <gi...@apache.org>.
zhangmeng916 commented on pull request #1265:
URL: https://github.com/apache/helix/pull/1265#issuecomment-673713220


   > Let us see the results from github test run.
   
   @kaisun2000 
   Here's the result from github run:
   
   [ERROR] Failures: 
   [ERROR]   TestEnableCompression.testEnableCompressionResource:116 » ThreadTimeout Method...
   [ERROR]   TestWagedRebalance.testChangeIdealState:303->validate:646 expected:<true> but was:<false>
   [ERROR]   TestEnqueueJobs.testQueueJobsMaxCapacity » ThreadTimeout Method org.testng.int...
   [INFO] 
   [ERROR] Tests run: 1164, Failures: 3, Errors: 0, Skipped: 0


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


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

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on a change in pull request #1265:
URL: https://github.com/apache/helix/pull/1265#discussion_r470248972



##########
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:
       Why this line is needed?




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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [helix] kaisun2000 commented on pull request #1265: Change TestInstanceAutoJoin to adapt to cloud environment

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on pull request #1265:
URL: https://github.com/apache/helix/pull/1265#issuecomment-673711740


   Let us see the results from github test run.


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


[GitHub] [helix] dasahcc merged pull request #1265: Change TestInstanceAutoJoin to adapt to cloud environment

Posted by GitBox <gi...@apache.org>.
dasahcc merged pull request #1265:
URL: https://github.com/apache/helix/pull/1265


   


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