[incubator-kie-issues-1131] test migration from V7 to code generation-23 #3635
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue's with testEventBasedSplit3 and testEventBaedSplit5 tests within IntermediateEventTest.java
The test can be identified by referring to IntermediateEventTest.java:
https:/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/IntermediateEventTest.java
Closes apache/incubator-kie-issues#1131.
Issue 1:
testEventBasedSplit3
Error: java.lang.NullPointerException: Cannot invoke "org.drools.core.common.InternalAgenda.isRuleActiveInRuleFlowGroup(String, String, String)" because the return value of "org.drools.core.common.InternalKnowledgeRuntime.getAgenda()" is null
at org.jbpm.bpmn2.IntermediateEventTest.testEventBasedSplit3(IntermediateEventTest.java:479)
org.opentest4j.AssertionFailedError:
expected: 1
but was: 5
In the v7, we use:
kruntime.getKieSession().insert(jack);
But there appears to be an issue because the jack variable doesn't exist in our data model. Could you please guide on how we should handle this.
Issue 2:
testEventBasedSplit5
The receive task handler needs a kruntime object. Need guidance on how to create this handler in v9 as we don't have the kruntime object.
ReceiveTaskHandler receiveTaskHandler = new ReceiveTaskHandler(null); ProcessTestHelper.registerHandler(app, "Receive Task", receiveTaskHandler);