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 21:28:00 UTC
[jira] [Created] (CAMEL-20291) Test cases fail due to threading issues when running 'mvn test'
Craig Ziesman created CAMEL-20291:
-------------------------------------
Summary: 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
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)