diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEventTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEventTests.java index 891430057513e..21fadee4e78a8 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEventTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEventTests.java @@ -207,7 +207,7 @@ private void validateScheduledEventSuccessfulBuild( String description = randomAlphaOfLength(10); String calendarId = randomAlphaOfLength(10); Instant startTime = Instant.ofEpochMilli(Instant.now().toEpochMilli()); - Instant endTime = startTime.plusSeconds(randomInt(3600)); + Instant endTime = startTime.plusSeconds(randomIntBetween(1, 3600)); ScheduledEvent.Builder builder = new ScheduledEvent.Builder().description(description) .calendarId(calendarId)