public static List<PeerId> generatePeers(final int n) {
        List<PeerId> ret = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            ret.add(new PeerId(getMyIp(), INIT_PORT + i));
        }
        return ret;
    }
Test helper

@author boyan (boyan@alibaba-inc.com)

2018-Apr-11 10:16:07 AM
jraft-extension/java-log-storage-impl/src/test/java/com/alipay/sofa/jraft/test/TestUtils.java