You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "orpiske (via GitHub)" <gi...@apache.org> on 2023/05/21 14:38:29 UTC

[GitHub] [camel] orpiske commented on pull request #10181: CAMEL-19375: Upgrade to angus-mail 2.0.1, test camel-mail against GreenMail instead of mock_javamail

orpiske commented on PR #10181:
URL: https://github.com/apache/camel/pull/10181#issuecomment-1556196071

   > > they run concurrently
   > 
   > Interesting, I did not know some tests were executed in parallel. BTW, with the current changes, it is doable to make the tests in camel-mail ready for concurrent execution too. The key change in the current PR is that each mailbox user and mailbox is explicitly present in the test class as a field. What is missing is to change the creation of the users and mailboxes to random usernames, email addresses and passwords so that they cannot clash with other tests executed parallely. Plus the users and mailboxes should be removed after the test execution. This is doable e.g. by implementing a Junit5 extension.
   
   Yeah. We have been tweaking the JMS tests to reduce their flakiness. If you want to give it a try with the `camel-mail` ones, you need need to set the following properties on the pom:
   
   ```
   <camel.surefire.reuseForks>true</camel.surefire.reuseForks>
   <camel.surefire.forkCount>1</camel.surefire.forkCount>
   <camel.surefire.forkTimeout>1200</camel.surefire.forkTimeout>
   <camel.surefire.parallel>true</camel.surefire.parallel>
   <camel.surefire.parallel.factor>0.5</camel.surefire.parallel.factor>
   ```
   
   And then adjust the code to avoid using non-shareable resources when possible (or isolate the non-concurrent ones to a different execution). 
   
   Ideally, converting the code to use the [JUnit 5 extension](https://issues.apache.org/jira/browse/CAMEL-18957) from `camel-test-infra-core`  instead of using `CamelTestSupport` from `camel-test-junit5` can also help making them simpler and easier to maintain.
   


-- 
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@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org