You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "yesamer (via GitHub)" <gi...@apache.org> on 2026/04/22 10:11:26 UTC
[PR] [NO-ISSUE] Fix flaky PersistenceTest by disabling parallel test execution [incubator-kie-drools]
yesamer opened a new pull request, #6675:
URL: https://github.com/apache/incubator-kie-drools/pull/6675
### Fix flaky PersistenceTest by disabling parallel test execution
**Problem:**
`PersistenceTest.testTraitsSerialization` fails intermittently with:
```
org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization,
but the following listed types were not enhanced at build time or at class load time with a javaagent:
org.drools.persistence.info.WorkItemInfo
org.drools.persistence.info.SessionInfo
```
**Root Cause:**
The test uses OpenJPA with `-javaagent` for runtime entity enhancement. With `surefire.forkCount=2`, two test instances run in parallel, creating a race condition:
- The javaagent enhancement is asynchronous
- When tests run concurrently, EntityManagerFactory creation sometimes happens before enhancement completes
- This triggers the "unenhanced classes" error
**Solution:**
Removed `surefire.forkCount=2` property to use Maven's default sequential execution (`forkCount=1`). This ensures the javaagent completes enhancement before any EntityManagerFactory is created.
**Testing:**
The fix can be verified by running the test multiple times:
```bash
mvn clean test -pl drools-traits -Dtest=PersistenceTest -Dsurefire.rerunFailingTestsCount=10
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [NO-ISSUE] Fix flaky PersistenceTest by disabling parallel test execution [incubator-kie-drools]
Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer merged PR #6675:
URL: https://github.com/apache/incubator-kie-drools/pull/6675
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org