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/02/04 00:32:08 UTC

[GitHub] [helix] alirezazamani commented on a change in pull request #717: Upgrade AbstractTestClass with multi-ZK support in helix-rest

alirezazamani commented on a change in pull request #717: Upgrade AbstractTestClass with multi-ZK support in helix-rest
URL: https://github.com/apache/helix/pull/717#discussion_r374417025
 
 

 ##########
 File path: helix-rest/src/test/java/org/apache/helix/rest/server/AbstractTestClass.java
 ##########
 @@ -149,20 +155,43 @@ public void clearupLogs() {
   @Override
   protected Application configure() {
     // start zk
+    _zkServerMap = new HashMap<>();
     try {
       if (_zkServer == null) {
         _zkServer = TestHelper.startZkServer(ZK_ADDR);
-        Assert.assertTrue(_zkServer != null);
+        Assert.assertNotNull(_zkServer);
+        _zkServerMap.put(ZK_ADDR, _zkServer);
         ZKClientPool.reset();
       }
 
       if (_zkServerTestNS == null) {
         _zkServerTestNS = TestHelper.startZkServer(_zkAddrTestNS);
-        Assert.assertTrue(_zkServerTestNS != null);
+        Assert.assertNotNull(_zkServerTestNS);
+        _zkServerMap.put(_zkAddrTestNS, _zkServerTestNS);
         ZKClientPool.reset();
       }
     } catch (Exception e) {
-      Assert.assertTrue(false, String.format("Failed to start ZK server: %s", e.toString()));
+      Assert.fail(String.format("Failed to start ZK server: %s", e.toString()));
+    }
+
+    // Start additional ZKs in a multi-ZK setup
+    String multiZkConfig = System.getProperty(MULTI_ZK_PROPERTY_KEY);
 
 Review comment:
   Question: In the test suit, where do we set MULTI_ZK_PROPERTY_KEY and NUM_ZK_PROPERTY_KEY?

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


With regards,
Apache Git Services

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