diff --git a/jraft-core/src/test/java/com/alipay/sofa/jraft/core/TestCluster.java b/jraft-core/src/test/java/com/alipay/sofa/jraft/core/TestCluster.java index f8808ffa2..deea77312 100644 --- a/jraft-core/src/test/java/com/alipay/sofa/jraft/core/TestCluster.java +++ b/jraft-core/src/test/java/com/alipay/sofa/jraft/core/TestCluster.java @@ -144,8 +144,7 @@ public boolean start(final Endpoint addr, final int priority) throws Exception { return this.start(addr, false, 300, false, null, null, priority); } - public boolean startWithFlexible(final Endpoint addr, final int readFactor, final int writeFactor) - throws Exception { + public boolean startWithFlexible(final Endpoint addr, final int readFactor, final int writeFactor) throws Exception { return this.start(addr, false, 300, false, readFactor, writeFactor, null, null); } @@ -155,7 +154,7 @@ public boolean startLearner(final PeerId peer) throws Exception { } public boolean startLearnerWithFlexible(final PeerId peer, final int readFactor, final int writeFactor) - throws Exception { + throws Exception { this.learners.add(peer); return this.start(peer.getEndpoint(), false, 300, false, readFactor, writeFactor, null, null); } @@ -304,7 +303,7 @@ public boolean start(final Endpoint listenAddr, final boolean emptyPeers, final nodeOptions.setInitialConf(initConf); } - if (readFactor!=0 && writeFactor!=0) { + if (readFactor != 0 && writeFactor != 0) { nodeOptions.enableFlexibleRaft(true); nodeOptions.setFactor(readFactor, writeFactor); }