Fix CoordinatorTests.testIncompatibleDiffResendsFullState (#39345)
This test started failing since decreasing the leader and follower check timeouts (#38298). The reason is that the test was relying on the default publication timeout to come into effect before leader / follower check timeouts, which is now not always true anymore. Closes #38867
This commit is contained in:
parent
ca78e44006
commit
292eb8b001
|
@ -872,7 +872,6 @@ public class CoordinatorTests extends ESTestCase {
|
||||||
assertEquals(0L, newNodePublishStats.getIncompatibleClusterStateDiffReceivedCount());
|
assertEquals(0L, newNodePublishStats.getIncompatibleClusterStateDiffReceivedCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/38867")
|
|
||||||
public void testIncompatibleDiffResendsFullState() {
|
public void testIncompatibleDiffResendsFullState() {
|
||||||
final Cluster cluster = new Cluster(randomIntBetween(3, 5));
|
final Cluster cluster = new Cluster(randomIntBetween(3, 5));
|
||||||
cluster.runRandomly();
|
cluster.runRandomly();
|
||||||
|
@ -885,12 +884,12 @@ public class CoordinatorTests extends ESTestCase {
|
||||||
final PublishClusterStateStats prePublishStats = follower.coordinator.stats().getPublishStats();
|
final PublishClusterStateStats prePublishStats = follower.coordinator.stats().getPublishStats();
|
||||||
logger.info("--> submitting first value to {}", leader);
|
logger.info("--> submitting first value to {}", leader);
|
||||||
leader.submitValue(randomLong());
|
leader.submitValue(randomLong());
|
||||||
cluster.runFor(DEFAULT_CLUSTER_STATE_UPDATE_DELAY + defaultMillis(PUBLISH_TIMEOUT_SETTING), "publish first state");
|
cluster.runFor(DEFAULT_CLUSTER_STATE_UPDATE_DELAY, "publish first state");
|
||||||
logger.info("--> healing {}", follower);
|
logger.info("--> healing {}", follower);
|
||||||
follower.heal();
|
follower.heal();
|
||||||
logger.info("--> submitting second value to {}", leader);
|
logger.info("--> submitting second value to {}", leader);
|
||||||
leader.submitValue(randomLong());
|
leader.submitValue(randomLong());
|
||||||
cluster.stabilise(DEFAULT_CLUSTER_STATE_UPDATE_DELAY);
|
cluster.stabilise();
|
||||||
final PublishClusterStateStats postPublishStats = follower.coordinator.stats().getPublishStats();
|
final PublishClusterStateStats postPublishStats = follower.coordinator.stats().getPublishStats();
|
||||||
assertEquals(prePublishStats.getFullClusterStateReceivedCount() + 1,
|
assertEquals(prePublishStats.getFullClusterStateReceivedCount() + 1,
|
||||||
postPublishStats.getFullClusterStateReceivedCount());
|
postPublishStats.getFullClusterStateReceivedCount());
|
||||||
|
|
Loading…
Reference in New Issue