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-18 #3622

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

Abhitocode
Copy link
Contributor

In addition to previous changes associated,
Migrated tests within SLAComplianceTest.java

The test can be identified by referring to SLAComplianceTest.java:
https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/SLAComplianceTest.java

Closes apache/incubator-kie-issues#1131.

@Abhitocode Abhitocode marked this pull request as ready for review August 15, 2024 14:44
@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 15, 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 #3622 --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-3622/1/display/redirect

Test results:

  • PASSED: 3294
  • FAILED: 3

Those are the test failures:

org.jbpm.bpmn2.SLAComplianceTest.testSLAonProcessViolated [SLA was not violated while it is expected]
Expecting value to be true but was false
org.jbpm.bpmn2.SLAComplianceTest.testSLAonCatchEventViolated [SLA should be violated by timer]
Expecting value to be true but was false
org.jbpm.bpmn2.SLAComplianceTest.testSLAonUserTaskViolated [SLA was not violated while it is expected]
Expecting value to be true but was false

Copy link
Contributor

@elguardian elguardian left a comment

Choose a reason for hiding this comment

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

LGTM

@martinweiler
Copy link
Contributor

@Abhitocode I get test failures, am I missing some other code change required?

$ (cd jbpm/jbpm-tests/ && mvn test -Dtest=SLAComplianceTest)
...
[ERROR] Failures: 
[ERROR]   SLAComplianceTest.testSLAonCatchEventViolated:322 [SLA should be violated by timer] 
Expecting value to be true but was false
[ERROR]   SLAComplianceTest.testSLAonProcessViolated:77 [SLA was not violated while it is expected] 
Expecting value to be true but was false
[ERROR]   SLAComplianceTest.testSLAonUserTaskViolated:130 [SLA was not violated while it is expected] 
Expecting value to be true but was false
[INFO] 
[ERROR] Tests run: 9, Failures: 3, Errors: 0, Skipped: 0

@Abhitocode
Copy link
Contributor Author

Abhitocode commented Aug 22, 2024

Hi @martinweiler When we run test cases individually they are all passing but when we run whole test class those 3 are failing.

Assessment: I suspect this is due to concurrency or timing issues. I tried adjusting the countdown latch and timer, but neither worked. I also used a single latch variable across all test cases and applied the @execution annotation, but nothing resolved the issue. When the whole test class is run, latch.await() is not completing. If we use latch.await() with a maximum time limit yet returns false. Your guidance would be helpful.

@Abhitocode Abhitocode force-pushed the incubator-kie-issues-1131-18 branch 2 times, most recently from 09dfea4 to 1383834 Compare August 28, 2024 06:21
@apache apache deleted a comment from kie-ci3 Aug 29, 2024
@apache apache deleted a comment from kie-ci3 Aug 29, 2024
@Abhitocode
Copy link
Contributor Author

The duplicate assert is removed for testSLAonUserTaskMet, might have overlooked before, thanks for catching that. Updated the same.

@elguardian elguardian merged commit c97fe31 into apache:main Sep 9, 2024
6 checks passed
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request Sep 9, 2024
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.

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