gmunozfe opened a new issue, #3818:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3818
### Describe the bug
Notice that the test BusinessCalendarImplTest#rollCalendarAfterHolidays has
a wrong calculation if it is run near the year's end, as `currentDayOfYear +
holidayLeft ` will exceed 365 (or 366 in a leap year), and the test is not
taken this into account
### Expected behavior
The test should consider the year rollover if the sum of `currentDayOfYear +
holidayLeft ` exceeds the maximum number of days in a year (366 in a leap year
or 365 in a normal year)
### Actual behavior
org.opentest4j.AssertionFailedError:
expected: 367
but was: 1
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at
org.jbpm.process.core.timer.BusinessCalendarImplTest.rollCalendarAfterHolidays(BusinessCalendarImplTest.java:238)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
### How to Reproduce?
Execute the test:
`mvn clean install -Dtest=BusinessCalendarImplTest#rollCalendarAfterHolidays`
### Output of `uname -a` or `ver`
_No response_
### Output of `java -version`
_No response_
### GraalVM version (if different from Java)
_No response_
### Kogito version or git rev (or at least Quarkus version if you are using
Kogito via Quarkus platform BOM)
_No response_
### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
_No response_
### Additional information
_No response_
--
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]