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:
Yannick Welsch 2019-03-11 18:58:46 +01:00
parent ca78e44006
commit 292eb8b001
1 changed files with 2 additions and 3 deletions

View File

@ -872,7 +872,6 @@ public class CoordinatorTests extends ESTestCase {
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();
@ -885,12 +884,12 @@ public class CoordinatorTests extends ESTestCase {
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());