use of com.alipay.sofa.jraft.core.TestCluster in project sofa-jraft by sofastack.
the class RouteTableTest method setup.
@Before
public void setup() throws Exception {
cliClientService = new CliClientServiceImpl();
cliClientService.init(new CliOptions());
this.dataPath = TestUtils.mkTempDir();
FileUtils.forceMkdir(new File(this.dataPath));
assertEquals(NodeImpl.GLOBAL_NUM_NODES.get(), 0);
final List<PeerId> peers = TestUtils.generatePeers(3);
cluster = new TestCluster(groupId, dataPath, peers);
for (final PeerId peer : peers) {
cluster.start(peer.getEndpoint());
}
cluster.waitLeader();
}
Aggregations