atiaomar1978-hub opened a new pull request, #25331:
URL: https://github.com/apache/camel/pull/25331

   ## Summary
   
   Fixes [CAMEL-24036](https://issues.apache.org/jira/browse/CAMEL-24036): 
`AsyncWiretapTest` is flaky in CI because async wiretap routes (2s delay) 
complete before trace export finishes.
   
   **Root cause:** tests used `Thread.sleep(10000)`, no wait, or 
`mock.assertIsSatisfied(1000)` with conflicting `setAssertPeriod(5000)` — all 
insufficient for async trace writing.
   
   **Fix:**
   - Use `MockEndpoint.assertIsSatisfied(context, 30, SECONDS)` for wiretap 
mock completion
   - Poll with Awaitility until all traces have expected span counts **and** 
all spans are done (`isDone=true`)
   - Add named constants and 100ms poll interval for responsive polling
   - Drop unnecessary `public` on test classes
   
   **Modules updated:**
   - `camel-telemetry` / `camel-telemetry-dev` — hardened existing fix (related 
[CAMEL-24038](https://issues.apache.org/jira/browse/CAMEL-24038) / #24636)
   - `camel-opentelemetry2` / `camel-micrometer-observability` — apply same 
flaky-pattern fix
   
   ## Test plan
   
   - [x] `./mvnw -pl 
components/camel-telemetry,components/camel-telemetry-dev,components/camel-opentelemetry2,components/camel-micrometer-observability
 -am test -Dtest=AsyncWiretapTest`
   
   ---
   _AI-generated PR description on behalf of atiaomar1978-hub_


-- 
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