apupier opened a new pull request, #30775:
URL: https://github.com/apache/camel/pull/30775

   # Description
   
   Several recently added tests were flaky because on CI they run with high 
concurrency and parallelism (parallel Maven modules, several surefire forks, 
concurrent JUnit test classes), which is rarely considered when a test is first 
written.
   
   This adds a "Tests must survive CI load and parallelism" section under "Test 
Code" in `AGENTS.md` so that agents (and humans) consider it for new tests:
   
   - use Awaitility with an explicit and generous `atMost` for asynchronous 
conditions
   - avoid fixed ports (prefer port 0; `AvailablePortFinder.find()` does not 
keep the port bound, only registers it in the JVM)
   - avoid shared files, directories, system properties and static state
   - use `@ResourceLock` when an exclusive resource is unavoidable
   - for Camel CLI / Camel MCP, start internal CamelContexts with 
`ScratchContextHelper.withoutCliConnector(...)` so they do not show up as 
running integrations
   - how to reproduce intermittent failures (`-Dcamel.surefire.forkCount=8`)
   
   Documentation-only change, no JIRA ticket.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [ ] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [ ] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes. (documentation only, nothing 
generated)
   
   ---
   _Bob (IBM Bob 2.2.1) on behalf of @apupier_


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to