You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by yo...@apache.org on 2023/12/22 08:26:46 UTC
(iotdb) 01/01: Add leader check
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch enhance-restart-it
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 18844a3dc51f2f2159a43a8b07d5807aeda77cf0
Author: YongzaoDan <53...@qq.com>
AuthorDate: Fri Dec 22 16:26:34 2023 +0800
Add leader check
---
.../iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/integration-test/src/test/java/org/apache/iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java b/integration-test/src/test/java/org/apache/iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java
index 4d3e0f2593c..d3072eac66c 100644
--- a/integration-test/src/test/java/org/apache/iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/confignode/it/cluster/IoTDBClusterRestartIT.java
@@ -92,9 +92,18 @@ public class IoTDBClusterRestartIT {
TimeUnit.SECONDS.sleep(1);
// Restart all cluster nodes
+ logger.info("Restarting all ConfigNodes...");
for (int i = 0; i < testConfigNodeNum; i++) {
EnvFactory.getEnv().startConfigNode(i);
}
+ try (SyncConfigNodeIServiceClient client =
+ (SyncConfigNodeIServiceClient) getLeaderConfigNodeConnection()) {
+ // Do noting, just try to connect to the ConfigNode-leader
+ // in order to ensure the ConfigNode-leader is ready
+ } catch (Exception e) {
+ logger.error("Failed to get ConfigNode-leader connection", e);
+ }
+ logger.info("Restarting all DataNodes...");
for (int i = 0; i < testDataNodeNum; i++) {
EnvFactory.getEnv().startDataNode(i);
}