atiaomar1978-hub commented on PR #25331:
URL: https://github.com/apache/camel/pull/25331#issuecomment-5185049239

   ## Fix summary
   
   Addresses [CAMEL-24036](https://issues.apache.org/jira/browse/CAMEL-24036) — 
flaky `AsyncWiretapTest` in telemetry modules.
   
   **Problem:** async wiretap route has 2s delay per message; trace export is 
async. Old tests used `Thread.sleep(10000)`, no wait, or 
`mock.assertIsSatisfied(1000)` + `setAssertPeriod(5000)` — all race-prone.
   
   **Fix applied:**
   - `MockEndpoint.assertIsSatisfied(context, 30, SECONDS)` — wait for all 10 
wiretap messages
   - `Awaitility` polls until each trace has 7 spans **and** all spans have 
`isDone=true`
   - Named constants (`MESSAGE_COUNT`, `SPAN_COUNT`, `TIMEOUT_SECONDS`)
   - Dropped `public` on test classes
   
   **Modules:**
   | Module | Change |
   |---|---|
   | `camel-telemetry` | Harden CAMEL-24038 fix with isDone polling |
   | `camel-telemetry-dev` | Harden CAMEL-24038 fix with isDone polling |
   | `camel-opentelemetry2` | Apply full fix (was still flaky) |
   | `camel-micrometer-observability` | Apply full fix (was still flaky) |
   
   **Verified locally:**
   ```bash
   ./mvnw -pl 
components/camel-telemetry,components/camel-telemetry-dev,components/camel-opentelemetry2,components/camel-micrometer-observability
 -am test -Dtest=AsyncWiretapTest
   ```
   
   > Note: `camel-telemetry`/`camel-telemetry-dev` core fix was previously 
merged as [CAMEL-24038](https://issues.apache.org/jira/browse/CAMEL-24038) 
(#24636). This PR hardens those tests and extends the pattern to 
opentelemetry2/micrometer.
   
   ---
   _AI-generated comment 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