You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Craig Ziesman (Jira)" <ji...@apache.org> on 2024/01/03 22:11:00 UTC
[jira] [Commented] (CAMEL-20291) Test cases fail due to threading issues when running 'mvn test'
[ https://issues.apache.org/jira/browse/CAMEL-20291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17802334#comment-17802334 ]
Craig Ziesman commented on CAMEL-20291:
---------------------------------------
Also need to disable {{ForegroundTimeTaskTest}} until it can be determined why the tests are failing and whether or not they are even useful.
> Test cases fail due to threading issues when running 'mvn test'
> ---------------------------------------------------------------
>
> Key: CAMEL-20291
> URL: https://issues.apache.org/jira/browse/CAMEL-20291
> Project: Camel
> Issue Type: Improvement
> Reporter: Craig Ziesman
> Assignee: Craig Ziesman
> Priority: Minor
>
> When running {{mvn install}} or {{{}mvn test{}}}, many Camel unit tests that are based on {{ContextTestSupport}} fail. These failures are due to threading issues that rarely occur when testing individual modules. {{{}CamelTestSupport{}}}, which is used for testing classes outside of Camel Core, uses {{ThreadLocal}} instances for the {{{}CamelContext{}}}, the {{{}ProducerTemplate{}}}, and the {{{}ConsumerTemplate{}}}. {{ContextTestSupport}} should be updated to use {{ThreadLocal}} as well. In addition, the property {{camel.surefire.reuseForks}} in {{parent/pom.xml}} should default to {{{}false{}}}. With these changes, all of the unit tests will pass.
> {{[INFO] Results:}}
> {{[INFO] }}
> {{[WARNING] Tests run: 7252, Failures: 0, Errors: 0, Skipped: 38}}
> {{[INFO] }}
> {{[INFO] ------------------------------------------------------------------------}}
> {{[INFO] BUILD SUCCESS}}
> {{[INFO] ------------------------------------------------------------------------}}
> {{[INFO] Total time: 47:36 min}}
> {{[INFO] Finished at: 2024-01-03T13:52:04-07:00}}
> {{[INFO] ------------------------------------------------------------------------}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)