Skip to content

Commit c10310a

Browse files
Fixing ScheduledEventTest generating same start and end time (#115877) (#116195)
Co-authored-by: Elastic Machine <[email protected]>
1 parent 4625b06 commit c10310a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,6 @@ tests:
267267
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
268268
method: test {p0=search.vectors/42_knn_search_int4_flat/Vector similarity with filter only}
269269
issue: https://github.com/elastic/elasticsearch/issues/115475
270-
- class: org.elasticsearch.xpack.core.ml.calendars.ScheduledEventTests
271-
method: testBuild_SucceedsWithDefaultSkipResultAndSkipModelUpdatesValues
272-
issue: https://github.com/elastic/elasticsearch/issues/115476
273270
- class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests
274271
method: testProcessFileChanges
275272
issue: https://github.com/elastic/elasticsearch/issues/115280

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)