@Override
  public TTestConnectionResp submitTestConnectionTaskToLeader() throws TException {
    try {
      // this rpc need special timeout
      connectAndSync(TestConnectionUtils.calculateDnToCnLeaderMaxTime());
      return executeRemoteCallWithRetry(
          () -> client.submitTestConnectionTaskToLeader(),
          resp -> !updateConfigNodeLeader(resp.getStatus()));
    } finally {
      // reset timeout to default
      connectAndSync();
    }
  }
The frame of execute RPC, include logic of retry and exception handling.

@param call which rpc should call
@param check check the rpc's result
@return rpc's result
@param <T> the type of rpc result
@throws TException if fails more than RETRY_NUM times, throw TException(MSG_RECONNECTION_FAIL)
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java