runzhiwang commented on a change in pull request #252:
URL: https://github.com/apache/incubator-ratis/pull/252#discussion_r517180695



##########
File path: 
ratis-server/src/test/java/org/apache/ratis/server/impl/LeaderElectionTests.java
##########
@@ -96,6 +96,27 @@ public void testChangeLeader() throws Exception {
     cluster.shutdown();
   }
 
+  @Test
+  public void testLostMajorityHeartbeats() throws Exception {
+    runWithNewCluster(3, this::runTestLostMajorityHeartbeats);
+  }
+
+  void runTestLostMajorityHeartbeats(CLUSTER cluster) throws Exception {
+    final RaftServerImpl leader = waitForLeader(cluster);
+    try {
+      isolate(cluster, leader.getId());
+      Thread.sleep(leader.getMaxTimeoutMs());
+      Thread.sleep(leader.getMaxTimeoutMs());

Review comment:
       `Thread.sleep(leader.getMaxTimeoutMs())` duplicated call ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to