Skip to content

Commit

Permalink
Fix CoordinatorTests.testIncompatibleDiffResendsFullState (#39345)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ywelsch committed Mar 11, 2019
1 parent ca78e44 commit 292eb8b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,6 @@ public void testJoiningNodeReceivesFullState() {
assertEquals(0L, newNodePublishStats.getIncompatibleClusterStateDiffReceivedCount());
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/38867")
public void testIncompatibleDiffResendsFullState() {
final Cluster cluster = new Cluster(randomIntBetween(3, 5));
cluster.runRandomly();
Expand All @@ -885,12 +884,12 @@ public void testIncompatibleDiffResendsFullState() {
final PublishClusterStateStats prePublishStats = follower.coordinator.stats().getPublishStats();
logger.info("--> submitting first value to {}", leader);
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);
follower.heal();
logger.info("--> submitting second value to {}", leader);
leader.submitValue(randomLong());
cluster.stabilise(DEFAULT_CLUSTER_STATE_UPDATE_DELAY);
cluster.stabilise();
final PublishClusterStateStats postPublishStats = follower.coordinator.stats().getPublishStats();
assertEquals(prePublishStats.getFullClusterStateReceivedCount() + 1,
postPublishStats.getFullClusterStateReceivedCount());
Expand Down

0 comments on commit 292eb8b

Please sign in to comment.