Skip to content

Commit

Permalink
fix(test): attempt at making the test not flakky
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye committed Feb 14, 2025
1 parent ddfed2e commit e928e76
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@ void shouldNotReturnExecutionForBackFillWhenCurrentDateIsBeforeScheduleDate() th
shouldReturnExecutionForBackFillWhenCurrentDateIsAfterScheduleDate() throws Exception {
// Given
Schedule trigger = Schedule.builder().id("schedule").cron(TEST_CRON_EVERYDAY_AT_8).build();
ZonedDateTime now = ZonedDateTime.now();
TriggerContext triggerContext = triggerContext(now, trigger).toBuilder()
ZonedDateTime now = ZonedDateTime.of(2025, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault());
TriggerContext triggerContext = triggerContext(ZonedDateTime.now(), trigger).toBuilder()
.backfill(Backfill
.builder()
.currentDate(ZonedDateTime.now().with(LocalTime.MIN).plus(Duration.ofHours(8)))
.end(ZonedDateTime.now().with(LocalTime.MAX))
.currentDate(now.with(LocalTime.MIN).plus(Duration.ofHours(8)))
.end(now.with(LocalTime.MAX))
.build()
)
.build();
Expand Down

0 comments on commit e928e76

Please sign in to comment.