Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[incubator-kie-issues-1131] test migration from V7 to code generation-27 #3652

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Abhitocode
Copy link
Contributor

@Abhitocode Abhitocode commented Aug 29, 2024

Below are the tests with issues, commented the same for each test.

  1. ErrorEventTest
  • testEventSubprocessErrorThrowOnTask and testCatchErrorBoundaryEventOnTask (both tests)
    It appears that the system can't cast org.jbpm.process.instance.impl.humantask.HumanTaskWorkItemDecoratorImpl to org.kie.kogito.process.workitems.impl.KogitoWorkItemImpl. I maybe wrong but I think the error exists in TestWorkItemHandler file.

error:
Caused by: org.jbpm.workflow.instance.WorkflowRuntimeException:
[ErrorBoundaryEventOnTask:09a6d44f-cbac-4033-a468-555a3b76b8ba - Boundary event:[uuid=BoundaryEvent_1]]
class org.jbpm.process.instance.impl.humantask.HumanTaskWorkItemDecoratorImpl cannot be cast to
class org.kie.kogito.process.workitems.impl.KogitoWorkItemImpl (org.jbpm.process.instance.impl.humantask.HumanTaskWorkItemDecoratorImpl
and org.kie.kogito.process.workitems.impl.KogitoWorkItemImpl are in unnamed module of loader 'app')

  1. EscalationEventTest
  • testInterruptingEscalationBoundaryEventOnTask
    The process instance does not reach completed state however I try but remains active instead.

error: [ERROR] EscalationEventTest.testInterruptingEscalationBoundaryEventOnTask:
* expected: 2
* but was: 1

  • testEscalationBoundaryEventInterrupting
    MyTask in subprocess is not completing successfully preventing the process to be in completed state
    also the TestWorkItemHandler does not mark work item to be completed resulting in the process to be active state.

error log:
Escalation handled

org.opentest4j.AssertionFailedError:
expected: 2
but was: 1

guidance on above would be helpful.

Closes apache/incubator-kie-issues#1131.

Note: This pr contains tests with error, only for review purpose.

@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 29, 2024

PR job #1 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3652 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3652/1/display/redirect

Test results:

  • PASSED: 3231
  • FAILED: 4

Those are the test failures:

org.jbpm.bpmn2.ErrorEventTest.testEventSubprocessErrorThrowOnTask
Expecting any elements of:
[==>[ProcessNodeLeft(nodeId=[uuid=SubProcess_1]; id=3f6aaf8e-2ac9-46d3-b052-994fd9acb285; nodeName=Sub Process 1; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeLeft(nodeId=[uuid=ScriptTask_1]; id=7bb77d0c-8b8c-40bc-8251-1c5d4029429a; nodeName=Script Task 1; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeTriggered(nodeId=[uuid=ScriptTask_1]; id=7bb77d0c-8b8c-40bc-8251-1c5d4029429a; nodeName=Script Task 1; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeLeft(nodeId=[uuid=StartEvent_2]; id=d9ee69ef-f94d-47d7-9715-74ac373a8f41; nodeName=start-sub; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeTriggered(nodeId=[uuid=UserTask_1]; id=b1dd6571-57ab-453b-8768-d34d83923df8; nodeName=User Task 1; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeLeft(nodeId=[uuid=StartEvent_1]; id=f0590bc3-899f-4c38-add5-7079c2af9884; nodeName=start; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeTriggered(nodeId=[uuid=StartEvent_1]; id=f0590bc3-899f-4c38-add5-7079c2af9884; nodeName=start; processName=Default Process; processId=EventSubprocessError)]]
to match given predicate but none did.
org.jbpm.bpmn2.ErrorEventTest.testCatchErrorBoundaryEventOnTask
expected: 1
but was: 5
org.jbpm.bpmn2.EscalationEventTest.testInterruptingEscalationBoundaryEventOnTask
expected: 2
but was: 1
org.jbpm.bpmn2.IntermediateEventTest.testIntermediateCatchEventTimerCycle3
expected: 3
but was: 2

@elguardian elguardian added the question Further information is requested label Aug 30, 2024
@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 30, 2024

PR job #2 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3652 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3652/2/display/redirect

Test results:

  • PASSED: 3231
  • FAILED: 4

Those are the test failures:

org.jbpm.bpmn2.ErrorEventTest.testEventSubprocessErrorThrowOnTask
Expecting any elements of:
[==>[ProcessNodeLeft(nodeId=[uuid=SubProcess_1]; id=1c515f17-991c-4d53-b6b5-e90fb5928c5f; nodeName=Sub Process 1; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeLeft(nodeId=[uuid=ScriptTask_1]; id=32926bd9-2d01-4e25-ab51-92588cb6b357; nodeName=Script Task 1; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeTriggered(nodeId=[uuid=ScriptTask_1]; id=32926bd9-2d01-4e25-ab51-92588cb6b357; nodeName=Script Task 1; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeLeft(nodeId=[uuid=StartEvent_2]; id=fdf132ea-42c0-43b7-be4d-1c1b19cd27d4; nodeName=start-sub; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeTriggered(nodeId=[uuid=UserTask_1]; id=5e73b0c2-f5ac-4dce-9c54-f1453083e1e0; nodeName=User Task 1; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeLeft(nodeId=[uuid=StartEvent_1]; id=835e98d6-04dd-4a82-aac0-e2994ae22210; nodeName=start; processName=Default Process; processId=EventSubprocessError)],
==>[ProcessNodeTriggered(nodeId=[uuid=StartEvent_1]; id=835e98d6-04dd-4a82-aac0-e2994ae22210; nodeName=start; processName=Default Process; processId=EventSubprocessError)]]
to match given predicate but none did.
org.jbpm.bpmn2.ErrorEventTest.testCatchErrorBoundaryEventOnTask
expected: 1
but was: 5
org.jbpm.bpmn2.EscalationEventTest.testInterruptingEscalationBoundaryEventOnTask
expected: 2
but was: 1
org.jbpm.bpmn2.EscalationEventTest.testEscalationBoundaryEventInterrupting
expected: 2
but was: 1

@elguardian elguardian self-requested a review September 16, 2024 06:40
@elguardian
Copy link
Contributor

this requires ht being merged prior to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate process test migration from v7 legacy runtime to code generation
3 participants