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


##########
jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/IntermediateEventTest.java:
##########
@@ -104,6 +111,33 @@ public void beforeNodeTriggered(ProcessNodeTriggeredEvent 
event) {
      * TESTS!
      */
 
+    @Test
+    public void testBoundaryTimerCycleCron() {
+        Application app = ProcessTestHelper.newApplication();
+        NodeCountDownProcessEventListener listener = new 
NodeCountDownProcessEventListener("Send Update", 3);
+        ProcessTestHelper.registerProcessEventListener(app, listener);
+        org.kie.kogito.process.Process<BoundaryTimerCycleCronModel> definition 
= BoundaryTimerCycleCronProcess.newProcess(app);
+        org.kie.kogito.process.ProcessInstance<BoundaryTimerCycleCronModel> 
instance = definition.createInstance(definition.createModel());
+        instance.start();
+        listener.waitTillCompleted();
+        ProcessTestHelper.completeWorkItem(instance, "john", 
Collections.emptyMap());
+        
assertThat(instance.status()).isEqualTo(org.kie.kogito.process.ProcessInstance.STATE_COMPLETED);
+    }
+
+    @Test
+    public void testBoundaryTimerCycleCronVariable() {
+        Application app = ProcessTestHelper.newApplication();
+        ProcessCompletedCountDownProcessEventListener listener = new 
ProcessCompletedCountDownProcessEventListener();
+        ProcessTestHelper.registerProcessEventListener(app, listener);
+        org.kie.kogito.process.Process<BoundaryTimerCycleCronVariableModel> 
definition = BoundaryTimerCycleCronVariableProcess.newProcess(app);
+        BoundaryTimerCycleCronVariableModel model = definition.createModel();
+        model.setCronStr("PT1S");

Review Comment:
   I needed to change this to `R3/PT1S` (similar to the other test), otherwise 
the test fails with:
   ```
   [ERROR]   IntermediateEventTest.testBoundaryTimerCycleCronVariable:137 
   expected: 2
    but was: 5
   ```
   (I then also needed to add the `completeWorkItem` method to complete the 
process instance.)



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