martinweiler commented on code in PR #4334:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4334#discussion_r3633729498
##########
jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/EscalationEventTest.java:
##########
@@ -186,11 +189,16 @@ public void testEscalationBoundaryEvent() {
@Test
public void testEscalationBoundaryEventInterrupting() throws Exception {
- kruntime =
createKogitoProcessRuntime("org/jbpm/bpmn2/escalation/BPMN2-EscalationBoundaryEventInterrupting.bpmn2");
+ Application app = ProcessTestHelper.newApplication();
TestWorkItemHandler handler = new TestWorkItemHandler();
- kruntime.getKogitoWorkItemManager().registerWorkItemHandler("MyTask",
handler);
- KogitoProcessInstance processInstance =
kruntime.startProcess("EscalationBoundaryEventInterrupting");
- assertProcessInstanceCompleted(processInstance);
+ ProcessTestHelper.registerHandler(app, "MyTask", handler);
+
org.kie.kogito.process.Process<EscalationBoundaryEventInterruptingModel>
processDefinition = EscalationBoundaryEventInterruptingProcess.newProcess(app);
+
org.kie.kogito.process.ProcessInstance<EscalationBoundaryEventInterruptingModel>
processInstance =
processDefinition.createInstance(processDefinition.createModel());
+ processInstance.start();
+ KogitoWorkItem workItem = handler.getWorkItem();
+ assertThat(workItem).isNotNull();
+ ProcessTestHelper.completeWorkItem(processInstance,
Collections.emptyMap(), "john");
Review Comment:
Thanks for the detailed follow-up @SUNILathulya !
Discoveries like this are the true win of this test case conversion task!
Note that the verifications and asserts in the test cases should be the same
before and after the conversion. If for some reason the test then fails, we
need to investigate in that direction as it might indicate that the current
engine behavior is incorrect. What we should *not* do is to adapt the test case
so that it fits the engine's behavior.
This being said, it seems for these test cases there is another open PR that
might resolve the issue:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3312
Now that this PR needs to be re-opened against the drools repository, I'd
suggest to combine it with the changes from PR3312.
--
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]