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/12 07:36:30 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #1253: Test routing data cache

pkuwm commented on a change in pull request #1253:
URL: https://github.com/apache/helix/pull/1253#discussion_r469064041



##########
File path: helix-core/src/test/java/org/apache/helix/spectator/TestRoutingDataCache.java
##########
@@ -24,20 +24,21 @@
 import org.apache.helix.HelixConstants;
 import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
-import org.apache.helix.zookeeper.datamodel.ZNRecord;
 import org.apache.helix.integration.common.ZkStandAloneCMTestBase;
+import org.apache.helix.integration.manager.MockParticipantManager;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.mock.MockZkHelixDataAccessor;
 import org.apache.helix.model.CurrentState;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
 import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
 public class TestRoutingDataCache extends ZkStandAloneCMTestBase {
 
-  @Test()
-  public void testUpdateOnNotification() throws Exception {
+  @Test
+  public void testUpdateOnNotification() {

Review comment:
       I thought about it. But since `testCurrentStatesSelectiveUpdate` does not necessarily depend on the other two tests, adding dependsOnMethods may hide flaw of test. This test should be independent with other tests -- it should not change the global/parent states that may affect other tests -- it should restore the original states after the method. 
   
   So making it independent should be a better idea: no matter what the running order is, the tests should not fail.




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