Fix CoordinatorTests.testLogsMessagesIfPublicationDelayed (#62815) (#62822)

We need to account for an addional `DEFAULT_DELAY_VARIABILITY` timeout for
the lag detector task to be executed after its scheduled.

Closes #62383
This commit is contained in:
Armin Braun 2020-09-23 14:23:28 +02:00 committed by GitHub
parent 69e72656fa
commit a754fd8020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1464,7 +1464,6 @@ public class CoordinatorTests extends AbstractCoordinatorTestCase {
}
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/62383")
public void testLogsMessagesIfPublicationDelayed() throws IllegalAccessException {
try (Cluster cluster = new Cluster(between(3, 5))) {
cluster.runRandomly();
@ -1510,7 +1509,7 @@ public class CoordinatorTests extends AbstractCoordinatorTestCase {
});
cluster.getAnyLeader().submitValue(randomLong());
cluster.runFor(defaultMillis(PUBLISH_TIMEOUT_SETTING) + 2 * DEFAULT_DELAY_VARIABILITY
+ defaultMillis(LagDetector.CLUSTER_FOLLOWER_LAG_TIMEOUT_SETTING),
+ defaultMillis(LagDetector.CLUSTER_FOLLOWER_LAG_TIMEOUT_SETTING) + DEFAULT_DELAY_VARIABILITY,
"waiting for messages to be emitted");
mockLogAppender.assertAllExpectationsMatched();