gmunozfe commented on code in PR #3819:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3819#discussion_r1899645628
##########
jbpm/jbpm-flow/src/test/java/org/jbpm/process/core/timer/BusinessCalendarImplTest.java:
##########
@@ -233,8 +233,12 @@ void rollCalendarAfterHolidays() {
List<Integer> weekendDays = Collections.emptyList();
Calendar calendar = Calendar.getInstance();
int currentDayOfYear = calendar.get(Calendar.DAY_OF_YEAR);
+ int maxDaysInYear = calendar.getActualMaximum(Calendar.DAY_OF_YEAR);
BusinessCalendarImpl.rollCalendarAfterHolidays(calendar, holidays,
weekendDays, false);
int expected = currentDayOfYear + holidayLeft + 1;
+ if (expected > maxDaysInYear) {
+ expected -= maxDaysInYear;
+ }
Review Comment:
Good point @pibizza ! I've changed to have 2 tests, with and without year
rollover and setting also the year for not depending on the year (if it is or
not leap year)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]