Skip to content

Commit 292eb8b

Browse files
committed
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
1 parent ca78e44 commit 292eb8b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,6 @@ public void testJoiningNodeReceivesFullState() {
872872
assertEquals(0L, newNodePublishStats.getIncompatibleClusterStateDiffReceivedCount());
873873
}
874874

875-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/38867")
876875
public void testIncompatibleDiffResendsFullState() {
877876
final Cluster cluster = new Cluster(randomIntBetween(3, 5));
878877
cluster.runRandomly();
@@ -885,12 +884,12 @@ public void testIncompatibleDiffResendsFullState() {
885884
final PublishClusterStateStats prePublishStats = follower.coordinator.stats().getPublishStats();
886885
logger.info("--> submitting first value to {}", leader);
887886
leader.submitValue(randomLong());
888-
cluster.runFor(DEFAULT_CLUSTER_STATE_UPDATE_DELAY + defaultMillis(PUBLISH_TIMEOUT_SETTING), "publish first state");
887+
cluster.runFor(DEFAULT_CLUSTER_STATE_UPDATE_DELAY, "publish first state");
889888
logger.info("--> healing {}", follower);
890889
follower.heal();
891890
logger.info("--> submitting second value to {}", leader);
892891
leader.submitValue(randomLong());
893-
cluster.stabilise(DEFAULT_CLUSTER_STATE_UPDATE_DELAY);
892+
cluster.stabilise();
894893
final PublishClusterStateStats postPublishStats = follower.coordinator.stats().getPublishStats();
895894
assertEquals(prePublishStats.getFullClusterStateReceivedCount() + 1,
896895
postPublishStats.getFullClusterStateReceivedCount());

0 commit comments

Comments
 (0)