|
@@ -812,7 +812,13 @@ public class CoordinatorTests extends AbstractCoordinatorTestCase {
|
|
|
}
|
|
|
|
|
|
public void testAckListenerReceivesNoAckFromHangingFollower() {
|
|
|
- try (Cluster cluster = new Cluster(3)) {
|
|
|
+ try (
|
|
|
+ Cluster cluster = new Cluster(
|
|
|
+ 3,
|
|
|
+ true,
|
|
|
+ Settings.builder().put(LagDetector.CLUSTER_FOLLOWER_LAG_TIMEOUT_SETTING.getKey(), "1000d").build()
|
|
|
+ )
|
|
|
+ ) {
|
|
|
cluster.runRandomly();
|
|
|
cluster.stabilise();
|
|
|
final ClusterNode leader = cluster.getAnyLeader();
|
|
@@ -832,7 +838,13 @@ public class CoordinatorTests extends AbstractCoordinatorTestCase {
|
|
|
assertTrue("expected eventual ack from " + leader, ackCollector.hasAckedSuccessfully(leader));
|
|
|
assertFalse("expected no ack from " + follower0, ackCollector.hasAcked(follower0));
|
|
|
|
|
|
+ logger.info("--> publishing final value to resynchronize nodes");
|
|
|
follower0.setClusterStateApplyResponse(ClusterStateApplyResponse.SUCCEED);
|
|
|
+ ackCollector = leader.submitValue(randomLong());
|
|
|
+ cluster.stabilise(DEFAULT_CLUSTER_STATE_UPDATE_DELAY);
|
|
|
+ assertTrue(ackCollector.hasAckedSuccessfully(leader));
|
|
|
+ assertTrue(ackCollector.hasAckedSuccessfully(follower0));
|
|
|
+ assertTrue(ackCollector.hasAckedSuccessfully(follower1));
|
|
|
}
|
|
|
}
|
|
|
|