Allow extra time for a warning to be logged (#43597)
Today we assert that a warning is logged after no more than `discovery.cluster_formation_warning_timeout`, but the deterministic scheduler adds a small amount of extra randomness to the timing of future events, causing the following build to fail: ./gradlew :server:test --tests "org.elasticsearch.cluster.coordination.CoordinatorTests.testLogsWarningPeriodicallyIfClusterNotFormed" -Dtests.seed=DF35C28D4FA9EE2D This commit adds an allowance for this extra time.
This commit is contained in:
parent
76a750a0a0
commit
e738f0e6d2
|
@ -1324,7 +1324,7 @@ public class CoordinatorTests extends ESTestCase {
|
|||
equalTo(cluster.clusterNodes.stream().map(ClusterNode::getLocalNode).collect(Collectors.toSet())));
|
||||
}
|
||||
});
|
||||
cluster.runFor(warningDelayMillis, "waiting for warning to be emitted");
|
||||
cluster.runFor(warningDelayMillis + DEFAULT_DELAY_VARIABILITY, "waiting for warning to be emitted");
|
||||
mockLogAppender.assertAllExpectationsMatched();
|
||||
} finally {
|
||||
mockLogAppender.stop();
|
||||
|
|
Loading…
Reference in New Issue