@Override
  public IConfigNodeRPCService.Iface getConfigNodeConnection(int index) throws Exception {
    Exception lastException = null;
    final ConfigNodeWrapper configNodeWrapper = configNodeWrapperList.get(index);
    for (int i = 0; i < 30; i++) {
      try {
        return clientManager.borrowClient(
            new TEndPoint(configNodeWrapper.getIp(), configNodeWrapper.getPort()));
      } catch (final Exception e) {
        lastException = e;
      }
      // Sleep 1s before next retry
      TimeUnit.SECONDS.sleep(1);
    }
    throw new IOException(
        "Failed to get connection to this ConfigNode. Last error: " + lastException);
  }
Get connection to ConfigNode-Leader in ClusterIT environment

<p>Notice: The caller should always use try-with-resource to invoke this interface in order to
return client to ClientPool automatically

@return {@link SyncConfigNodeIServiceClient} that connects to the ConfigNode-Leader
integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java