Fix PersistedClusterStateServiceTests.testSlowLogging (#57971)
The range in the last writeDurationMillis selection could be empty, as it could prior to the call be set to 1.
This commit is contained in:
parent
947573f309
commit
34fc52dbf3
|
@ -858,7 +858,7 @@ public class PersistedClusterStateServiceTests extends ESTestCase {
|
||||||
"writing cluster state took [*] which is above the warn threshold of [*]; " +
|
"writing cluster state took [*] which is above the warn threshold of [*]; " +
|
||||||
"wrote global metadata [false] and metadata for [1] indices and skipped [0] unchanged indices"));
|
"wrote global metadata [false] and metadata for [1] indices and skipped [0] unchanged indices"));
|
||||||
|
|
||||||
writeDurationMillis.set(randomLongBetween(1, writeDurationMillis.get() - 1));
|
writeDurationMillis.set(randomLongBetween(0, writeDurationMillis.get() - 1));
|
||||||
assertExpectedLogs(1L, clusterState, newClusterState, writer, new MockLogAppender.UnseenEventExpectation(
|
assertExpectedLogs(1L, clusterState, newClusterState, writer, new MockLogAppender.UnseenEventExpectation(
|
||||||
"should not see warning below threshold",
|
"should not see warning below threshold",
|
||||||
PersistedClusterStateService.class.getCanonicalName(),
|
PersistedClusterStateService.class.getCanonicalName(),
|
||||||
|
|
Loading…
Reference in New Issue