public List<Endpoint> getAllNodes() {
        this.lock.lock();
        try {
            return this.nodes.stream().map(node -> node.getNodeId().getPeerId().getEndpoint())
                .collect(Collectors.toList());
        } finally {
            this.lock.unlock();
        }
    }
Ensure all peers leader is expectAddr
@param expectAddr expected address
@throws InterruptedException if interrupted
jraft-extension/java-log-storage-impl/src/test/java/com/alipay/sofa/jraft/core/TestCluster.java