You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/08/11 12:07:15 UTC

[GitHub] [iotdb] MiniSho commented on a diff in pull request #6960: [IOTDB-3825] Reinforce Cluster IT framework's startup check

MiniSho commented on code in PR #6960:
URL: https://github.com/apache/iotdb/pull/6960#discussion_r943406827


##########
integration-test/src/main/java/org/apache/iotdb/it/env/AbstractEnv.java:
##########
@@ -185,12 +187,40 @@ public void testWorking() {
     try {
       long startTime = System.currentTimeMillis();
       testDelegate.requestAll();
+      if (!configNodeWrapperList.isEmpty()) {
+        checkNodeHeartbeat();
+      }
       logger.info("Start cluster costs: {}s", (System.currentTimeMillis() - startTime) / 1000.0);
     } catch (Exception e) {
       fail("After 30 times retry, the cluster can't work!");
     }
   }
 
+  private void checkNodeHeartbeat() {
+    TShowClusterResp showClusterResp;
+    try (SyncConfigNodeIServiceClient client =
+        (SyncConfigNodeIServiceClient) getConfigNodeConnection()) {
+      boolean flag;
+      for (int i = 0; i < 30; i++) {
+        flag = true;
+        showClusterResp = client.showCluster();
+        Map<Integer, String> nodeStatus = showClusterResp.getNodeStatus();

Review Comment:
   done



-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org