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-35 #3665

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

Abhitocode
Copy link
Contributor

Migrated testErrorBetweenProcessesProcess within ActivityTest.java based on the changes suggested as below,

Application app = ProcessTestHelper.newApplication();
        ProcessTestHelper.registerProcessEventListener(app, new DefaultKogitoProcessEventListener() {
            @Override
            public void afterProcessCompleted(ProcessCompletedEvent event) {
                if ("ErrorsBetweenSubProcess".equals(event.getProcessInstance().getProcessId())) {
                    assertThat(event.getProcessInstance().getState()).isEqualTo(ProcessInstance.STATE_ABORTED);
                }
            }
        });
        ErrorsBetweenSubProcessProcess.newProcess(app);
        org.kie.kogito.process.Process<ErrorsBetweenProcessModel> process = ErrorsBetweenProcessProcess.newProcess(app);
        ErrorsBetweenProcessModel model = process.createModel();
        model.setTipoEvento("error");
        model.setPasoVariable(3);
        ProcessInstance<ErrorsBetweenProcessModel> processInstance = process.createInstance(model);
        processInstance.start();
        assertThat(processInstance.status()).isEqualTo(ProcessInstance.STATE_COMPLETED);

        Assertions.assertEquals("error desde Subproceso", processInstance.variables().getEvent());

@kie-ci3
Copy link
Contributor

kie-ci3 commented Sep 16, 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 #3665 --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-3665/1/display/redirect

Test results:

  • PASSED: 3346
  • FAILED: 3

Those are the test failures:

org.jbpm.bpmn2.IntermediateEventTest.testTimerBoundaryEventInterrupting
expected: 2
but was: 1
org.jbpm.bpmn2.IntermediateEventTest.testIntermediateCatchEventTimerDuration
expected: 2
but was: 1
org.jbpm.bpmn2.IntermediateEventTest.testEventBasedSplit2
expected: 2
but was: 1

@Abhitocode Abhitocode marked this pull request as ready for review December 4, 2024 19:55
@Abhitocode Abhitocode force-pushed the incubator-kie-issues-1131-35 branch from ffb6839 to 79ff659 Compare December 6, 2024 03:22

assertProcessVarValue(processInstance, "event", "error desde Subproceso");
Assertions.assertEquals("error desde Subproceso", processInstance.variables().getEvent());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use Assertj here :)

@pefernan pefernan merged commit 1f50813 into apache:main Dec 17, 2024
7 checks passed
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request Dec 17, 2024
…-35 (apache#3665)

* [incubator-kie-issues-1131] v7 migration to code generation

* incubator-kie-issues-1131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants