Skip to content

Commit

Permalink
[backend] Fix cron test failed
Browse files Browse the repository at this point in the history
  • Loading branch information
RomuDeuxfois authored Dec 12, 2024
1 parent 345d452 commit 8f5aee5
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ void given_cron_in_one_minute_should_create_simulation() throws JobExecutionExce

Scenario scenario = ScenarioFixture.getScenario();
int minuteToStart = (zonedDateTime.getMinute() + 1) % 60;
int hourToStart = zonedDateTime.getHour() + ((zonedDateTime.getMinute() + 1) / 60);
hourToStart = hourToStart % 24;

scenario.setRecurrence(
"0 "
+ minuteToStart
+ " "
+ zonedDateTime.getHour()
+ " * * *"); // Every day now + 1 minute
"0 " + minuteToStart + " " + hourToStart + " * * *"); // Every day now + 1 minute
Scenario scenarioSaved = this.scenarioService.createScenario(scenario);
SCENARIO_ID_2 = scenarioSaved.getId();

Expand Down

0 comments on commit 8f5aee5

Please sign in to comment.