MarkGaox commented on code in PR #2735:
URL: https://github.com/apache/helix/pull/2735#discussion_r1470558265


##########
helix-core/src/test/java/org/apache/helix/integration/manager/ClusterManager.java:
##########
@@ -34,7 +34,7 @@
 
 public class ClusterManager extends ZKHelixManager implements Runnable, 
ZkTestManager {
   private static Logger LOG = 
LoggerFactory.getLogger(ClusterControllerManager.class);
-  private static final int DISCONNECT_WAIT_TIME_MS = 3000;
+  private static final int DISCONNECT_WAIT_TIME_MS = 300;

Review Comment:
   Any particular reason for reducing this?



##########
helix-core/src/test/java/org/apache/helix/common/ZkTestBase.java:
##########
@@ -738,7 +731,7 @@ protected void deleteCluster(String clusterName) {
    */
   protected <T extends HelixProperty> T pollForProperty(Class<T> clazz, 
HelixDataAccessor accessor,
       PropertyKey key, boolean shouldExist) throws InterruptedException {
-    final int POLL_TIMEOUT = 5000;
+    final int POLL_TIMEOUT = 2000;

Review Comment:
   Curious, why 2000 not 1000?



##########
helix-core/src/test/java/org/apache/helix/TestHelper.java:
##########
@@ -864,4 +866,36 @@ public static void printZkListeners(HelixZkClient client) 
throws Exception {
     }
     System.out.println("}");
   }
+
+  public static HelixZkClient createZkClient(String zkAddress) {
+    HelixZkClient.ZkClientConfig clientConfig = new 
HelixZkClient.ZkClientConfig()
+        .setZkSerializer(new 
org.apache.helix.zookeeper.datamodel.serializer.ZNRecordSerializer())
+        .setConnectInitTimeout(1000L)
+        .setOperationRetryTimeout(1000L);
+
+    HelixZkClient.ZkConnectionConfig zkConnectionConfig = new 
HelixZkClient.ZkConnectionConfig(zkAddress)
+        .setSessionTimeout(1000);
+
+    return 
DedicatedZkClientFactory.getInstance().buildZkClient(zkConnectionConfig, 
clientConfig);
+  }
+
+  public static void sleepQuietly(Duration duration) {
+    try {
+      Thread.sleep(duration.toMillis());
+    } catch (InterruptedException e) {

Review Comment:
   I'm curious about what's the benefit of using sleepQuietly vs Thread.sleep()?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to