From 292eb8b0013658e32511185500b3c8c79ee78f71 Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Mon, 11 Mar 2019 18:58:46 +0100 Subject: [PATCH] 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 --- .../elasticsearch/cluster/coordination/CoordinatorTests.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java index 9bb4e808d8b..623d3fdc34b 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java @@ -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());