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

[DROOLS-6258] Fix drools-test-coverage for KieBaseTestConfiguration m… #3502

Merged
merged 1 commit into from
Apr 2, 2021

Conversation

tkobayas
Copy link
Contributor

@tkobayas tkobayas commented Apr 2, 2021

…anipulation

JIRA:

https://issues.redhat.com/browse/DROOLS-6258

How to retest this PR or trigger a specific build:
  • a pull request please add comment: Jenkins retest this

  • a full downstream build please add comment: Jenkins run fdb

  • a compile downstream build please add comment: Jenkins run cdb

  • a full production downstream build please add comment: Jenkins execute product fdb

  • an upstream build please add comment: Jenkins run upstream

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 2, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@tkobayas tkobayas marked this pull request as ready for review April 2, 2021 08:28
@tkobayas
Copy link
Contributor Author

tkobayas commented Apr 2, 2021

Hi @lucamolteni , @mariofusco ,
During the past test migration, I added setIdentity(), setStreamMode() to KieBaseTestConfiguration but it was my bad. KieBaseTestConfiguration has to be immutable. Luckily, we haven't hit issues in drools-test-coverage/test-compiler-integration in daily build (other than DROOLS-6255) but issues can be easily reproduced if you set surefire.forkCount=1 in pom.xml.

This fix will stabilize drools-test-coverage tests and I'll want to backport this to 7.52.x as well. Please reveiw, thanks!

@tkobayas
Copy link
Contributor Author

tkobayas commented Apr 2, 2021

"Linux - Compile Downstream Build " errors are not related to this PR.

[2021-04-02T07:30:15.665Z] [ERROR] Failed to execute goal on project google-sheets-workitem: Could not resolve dependencies for project org.jbpm.contrib:google-sheets-workitem:jar:7.53.0-SNAPSHOT: Could not transfer artifact com.google.http-client:google-http-client-jackson2:jar:1.23.0 from/to mirror-central (https://bxms-qe.rhev-ci-vms.eng.rdu2.redhat.com:8443/nexus/content/groups/kie-all/): /home/jenkins/.m2/repository/com/google/http-client/google-http-client-jackson2/1.23.0/google-http-client-jackson2-1.23.0.jar.part (No such file or directory) -> [Help 1]
[2021-04-02T07:30:15.665Z] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project google-sheets-workitem: Could not resolve dependencies for project org.jbpm.contrib:google-sheets-workitem:jar:7.53.0-SNAPSHOT: Could not transfer artifact com.google.http-client:google-http-client-jackson2:jar:1.23.0 from/to mirror-central (https://bxms-qe.rhev-ci-vms.eng.rdu2.redhat.com:8443/nexus/content/groups/kie-all/): /home/jenkins/.m2/repository/com/google/http-client/google-http-client-jackson2/1.23.0/google-http-client-jackson2-1.23.0.jar.part (No such file or directory)
[2021-04-02T07:30:15.665Z]     at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269)
[2021-04-02T07:30:15.665Z]     at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
[2021-04-02T07:30:15.665Z]     at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)

Comment on lines -2725 to +2726
kieBaseTestConfiguration.setStreamMode(true);
KieBase kbase = KieBaseUtil.getKieBaseFromKieModuleFromDrl("test", kieBaseTestConfiguration, str);
KieBaseTestConfiguration streamConfig = TestParametersUtil.getStreamInstanceOf(kieBaseTestConfiguration);
KieBase kbase = KieBaseUtil.getKieBaseFromKieModuleFromDrl("test", streamConfig, str);
Copy link
Contributor Author

@tkobayas tkobayas Apr 2, 2021

Choose a reason for hiding this comment

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

for example, instead of modifying kieBaseTestConfiguration, get the expected kieBaseTestConfiguration instance (Stream mode while other properties are the same)

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.

3 participants