martinweiler commented on code in PR #3872:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3872#discussion_r2016958793


##########
jbpm/jbpm-flow/src/test/java/org/jbpm/process/core/timer/DateTimeUtilsTest.java:
##########
@@ -135,7 +135,7 @@ public void testParseRepeatablePeriodOnly() {
 
         assertThat(parsedRepeatable[0]).isEqualTo(-1L);
         // Default delay time is 1000ms
-        assertThat(parsedRepeatable[1]).isEqualTo(1000L);

Review Comment:
   I think we should have the same test here as it was used in v7:
   
https://github.com/kiegroup/jbpm/blob/main/jbpm-flow/src/test/java/org/jbpm/process/core/timer/DateTimeUtilsTest.java#L126-L136
   
   In the new syntax, this would be:
   ```
           assertThat(parsedRepeatable[0]).isEqualTo(-1L);
           assertThat(parsedRepeatable[1] <= MINUTE_IN_MILLISECONDS).as("Parsed 
delay is bigger than " + MINUTE_IN_MILLISECONDS).isTrue();
           assertThat(parsedRepeatable[1] > FIFTY_NINE_SECONDS_IN_MILLISECONDS)
                   .as("Parsed delay is too low! Expected value is between " + 
MINUTE_IN_MILLISECONDS + " and " + FIFTY_NINE_SECONDS_IN_MILLISECONDS + " but 
is " + parsedRepeatable[1]).isTrue();
           assertThat(parsedRepeatable[2]).as("Parsed period should be one 
minute in milliseconds but is " + 
parsedRepeatable[2]).isEqualTo(MINUTE_IN_MILLISECONDS);
   ```
   
   Not directly linked to this change, but as you are on it, I think it might 
be a good idea to add the additional tests from v7 (starting in L138) to the 
codebase as well.



-- 
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]

Reply via email to