Skip to content

Commit ff315b4

Browse files
author
Max Hniebergall
committed
Prevent randomized end time from being zero-offset
1 parent 8cc76e4 commit ff315b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEventTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private void validateScheduledEventSuccessfulBuild(
207207
String description = randomAlphaOfLength(10);
208208
String calendarId = randomAlphaOfLength(10);
209209
Instant startTime = Instant.ofEpochMilli(Instant.now().toEpochMilli());
210-
Instant endTime = startTime.plusSeconds(randomInt(3600));
210+
Instant endTime = startTime.plusSeconds(randomIntBetween(1, 3600));
211211

212212
ScheduledEvent.Builder builder = new ScheduledEvent.Builder().description(description)
213213
.calendarId(calendarId)

0 commit comments

Comments
 (0)