private void assertNodeHandshakeEnded(Jedis node, int timeoutMs) {
	int sleepInterval = 100;
	for (int sleepTime = 0; sleepTime <= timeoutMs; sleepTime += sleepInterval) {
	    boolean isHandshaking = isAnyNodeHandshaking(node);
	    if (!isHandshaking)
		return;

	    try {
		Thread.sleep(sleepInterval);
	    } catch (InterruptedException e) {
	    }
	}

	throw new JedisException("Node handshaking is not ended");
    }