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-1602] Remove binaries from test resources on main #6144

Merged

Conversation

tkobayas
Copy link
Contributor

@tkobayas tkobayas commented Nov 5, 2024

  • WIP

Issue:

This PR is WIP, just to share the progress.

Currently, resolved these files:

  • ./incubator-kie-drools/efesto/efesto-core/efesto-common-api/src/test/resources/TestJar.jar

  • ./incubator-kie-drools/efesto/efesto-core/efesto-runtime-manager/efesto-runtime-manager-core/src/test/resources/TestJar.jar

  • ./incubator-kie-drools/efesto/efesto-core/efesto-common-core/src/test/resources/TestJar.jar

    -> They don't contain compiled resources. Just note them in NOTICE_BINARY.

  • ./incubator-kie-drools/drools-compiler/src/test/resources/primespoc.jar

    -> Created setter-overload project. Build and copy a jar file on the fly.

@tkobayas
Copy link
Contributor Author

tkobayas commented Nov 6, 2024

  • ./incubator-kie-drools/drools-compiler/src/test/resources/eventing-example.jar

  • ./incubator-kie-drools/drools-compiler/src/test/resources/KAModelTest.jar

  • ./incubator-kie-drools/drools-compiler/src/test/resources/JarWithSourceFiles.jar

    -> Removed as they are no longer used.

@tkobayas
Copy link
Contributor Author

tkobayas commented Nov 6, 2024

  • ./incubator-kie-drools/drools-test-coverage/test-compiler-integration/src/test/resources/only-jar-pojo-not-kjar-no-kmodule-1.0.0.jar

    -> Created only-jar-pojo-not-kjar-no-kmodule project

  • ./incubator-kie-drools/drools-test-coverage/test-compiler-integration/src/test/resources/billasurf.jar

  • ./incubator-kie-drools/drools-legacy-test-util/src/test/resources/billasurf.jar

-> Created surf project

  • ./incubator-kie-drools/drools-test-coverage/test-compiler-integration/src/test/resources/kie-project-simple-1.0.0.jar

    -> Created kie-project-simple it project under drools-test-coverage-jars-with-invoker

@kie-ci3
Copy link

kie-ci3 commented Nov 6, 2024

PR job #3 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-drools -u #6144 --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/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6144/3/display/redirect

Test results:

  • PASSED: 22705
  • FAILED: 5

Those are the test failures:

maven.invoker.it.kie-project-simple.kie-project-simple The build exited with code 1. See /home/jenkins/jenkins-agent/workspace/llrequest_jobs_drools-pr_PR-6144/kogito-pipelines/bc/apache_incubator-kie-drools/drools-test-coverage/test-compiler-integration-jars/test-compiler-integration-jars-with-invoker/target/it/kie-project-simple/build.log for details.
org.drools.mvel.integrationtests.KieRepositoryTest.testTryLoadNotExistingKjarFromClasspath java.lang.NullPointerException
at java.base/java.util.ArrayDeque.addLast(ArrayDeque.java:303)
at java.base/java.util.ArrayDeque.add(ArrayDeque.java:494)
at java.base/jdk.internal.loader.URLClassPath.(URLClassPath.java:159)
at java.base/jdk.internal.loader.URLClassPath.(URLClassPath.java:176)
at java.base/java.net.URLClassLoader.(URLClassLoader.java:152)
at org.drools.mvel.integrationtests.KieRepositoryTest.testTryLoadNotExistingKjarFromClasspath(KieRepositoryTest.java:60)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
org.drools.mvel.integrationtests.KieRepositoryTest.testLoadKjarFromClasspath java.lang.NullPointerException
at java.base/java.util.ArrayDeque.addLast(ArrayDeque.java:303)
at java.base/java.util.ArrayDeque.add(ArrayDeque.java:494)
at java.base/jdk.internal.loader.URLClassPath.(URLClassPath.java:159)
at java.base/jdk.internal.loader.URLClassPath.(URLClassPath.java:176)
at java.base/java.net.URLClassLoader.(URLClassLoader.java:152)
at org.drools.mvel.integrationtests.KieRepositoryTest.testLoadKjarFromClasspath(KieRepositoryTest.java:40)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
org.drools.mvel.integrationtests.MBeansMonitoringTest.testLoadKjarFromClasspath[KieBase type=STREAM_IDENTITY] java.lang.NullPointerException
at java.base/java.util.ArrayDeque.addLast(ArrayDeque.java:303)
at java.base/java.util.ArrayDeque.add(ArrayDeque.java:494)
at java.base/jdk.internal.loader.URLClassPath.(URLClassPath.java:159)
at java.base/jdk.internal.loader.URLClassPath.(URLClassPath.java:176)
at java.base/java.net.URLClassLoader.(URLClassLoader.java:152)
at org.drools.mvel.integrationtests.MBeansMonitoringTest.testLoadKjarFromClasspath(MBeansMonitoringTest.java:536)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
org.drools.mvel.integrationtests.MBeansMonitoringTest.testLoadKjarFromClasspath[KieBase type=STREAM_IDENTITY_MODEL_PATTERN] java.lang.NullPointerException
at java.base/java.util.ArrayDeque.addLast(ArrayDeque.java:303)
at java.base/java.util.ArrayDeque.add(ArrayDeque.java:494)
at java.base/jdk.internal.loader.URLClassPath.(URLClassPath.java:159)
at java.base/jdk.internal.loader.URLClassPath.(URLClassPath.java:176)
at java.base/java.net.URLClassLoader.(URLClassLoader.java:152)
at org.drools.mvel.integrationtests.MBeansMonitoringTest.testLoadKjarFromClasspath(MBeansMonitoringTest.java:536)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)

@kie-ci3
Copy link

kie-ci3 commented Nov 6, 2024

PR job #4 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-drools -u #6144 --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/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6144/4/display/redirect

Test results:

  • PASSED: 22708
  • FAILED: 1

Those are the test failures:

org.kie.maven.plugin.it.kie-maven-plugin-test-kjar-12.kie-maven-plugin-test-kjar-12 The build exited with code 1. See /home/jenkins/jenkins-agent/workspace/llrequest_jobs_drools-pr_PR-6144/kogito-pipelines/bc/apache_incubator-kie-drools/kie-maven-plugin/target/it/kie-maven-plugin-test-kjar-12/build.log for details.

@tkobayas
Copy link
Contributor Author

tkobayas commented Nov 7, 2024

  • ./incubator-kie-drools/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/compiler/xml/changeset/changeset.jar
    -> No longer used. Removed

  • ./incubator-kie-drools/drools-test-coverage/test-compiler-integration/src/test/resources/testEnum.jar
    -> Created "testEnum" project

  • ./incubator-kie-drools/drools-verifier/drools-verifier-drl/src/test/resources/org/drools/verifier/model.jar
    -> Created "drools-verifier-test-jar" project

…ects for them under drools-test-coverage-jars-with-invoker to be tested in test-suite KieContainerTest
@tkobayas
Copy link
Contributor Author

tkobayas commented Nov 7, 2024

  • ./incubator-kie-drools/kie-ci/src/test/resources/kjar/kjar-module-before.jar

  • ./incubator-kie-drools/kie-ci/src/test/resources/kjar/kjar-module-after.jar

    -> Moved to drools-test-coverage/test-suite. Removed jars and created projects under drools-test-coverage-jars-with-invoker

@tkobayas tkobayas marked this pull request as ready for review November 7, 2024 10:29
Copy link
Contributor

@pibizza pibizza left a comment

Choose a reason for hiding this comment

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

I do not know these tests a lot, but it looks good to me.

<!-- This profile makes sure that drools-test-coverage-jars is executed if not-->
<!-- See: https://github.com/apache/incubator-kie-drools/pull/6144 -->
<profile>
<id>missing-test-jar-file</id>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This profile is added for local development convenience.

For example, you may have drools-test-coverage-jars 999-SNAPSHOT in your local repo cache, but newly cloned the drools repo in a working directory. You don't have test jars like surf.jar in test-compiler-integration. So when you run test-compiler-integration, it will fail. This profile detects that the test jar is missing, so it invokes drools-test-coverage-jars to build and copy test jars. It will not happen again once the test jars are copied.

@mariofusco mariofusco merged commit 5af319c into apache:main Nov 8, 2024
8 of 9 checks passed
rgdoliveira pushed a commit to rgdoliveira/drools that referenced this pull request Nov 18, 2024
…in (apache#6144)

* [incubator-kie-issues-1602] Remove binaries from test resources on main
- WIP

* deleted unused test jars

* - binaries for KieRepositoryTest.

* replace billasurf.jar with surf project

* remove unused jar

* fixed build order

* temporarily disabled downstream GHA for quick check

* replace testEnum.jar with testEnum project

* resolve BanDuplicateClasses

* replace model.jar with a project

* remove kjar-module-after.jar and kjar-module-before.jar. Created projects for them under drools-test-coverage-jars-with-invoker to be tested in test-suite KieContainerTest

* clean up

* assertion message if file is not found

* Adding invoker to assist local development

* typo
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