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

   _Claude Code on behalf of gnodet_
   
   ## Summary
   
   Fix the flaky `LRAFailuresIT` test which has a **97% failure rate** 
([Develocity 
dashboard](https://develocity.apache.org/scans/tests?search.rootProjectNames=camel&tests.sortField=FLAKY)
 — 126/130 runs failing).
   
   ## Root Cause
   
   The test depends on the Narayana LRA coordinator (running in Docker via 
Testcontainers) to **retry failed compensation/completion callbacks**. The 
compensation/completion handler is configured to fail once then succeed, so the 
coordinator must retry after the first failure.
   
   The Narayana recovery manager uses a default `periodicRecoveryPeriod` of 
**120 seconds** with a `recoveryBackoffPeriod` of **10 seconds** (total cycle 
~130s). The test's Awaitility timeout was only **20 seconds** — far too short 
for the coordinator's retry to occur. The test only passed (~3% of the time) 
when it happened to start right before a recovery scan.
   
   PR #24418 changed the timing mechanism from `setResultWaitTime` to 
Awaitility but did not address the underlying coordinator retry timing.
   
   ## Fix
   
   - **Configure the LRA coordinator container** with shortened Narayana 
recovery periods via `JAVA_TOOL_OPTIONS`:
     - `periodicRecoveryPeriod=2` (down from 120s)
     - `recoveryBackoffPeriod=1` (down from 10s)
     - This makes the coordinator retry failed participant callbacks within ~3 
seconds instead of ~130 seconds
   - **Increase `LRAFailuresIT` Awaitility timeout** from 20s to 60s as a 
safety margin
   - **Increase `AbstractLRATestSupport.checkActiveLRAs()` timeout** from 2s to 
20s to accommodate recovery-driven LRA cleanup
   
   ## Files Changed
   
   | File | Change |
   |------|--------|
   | `test-infra/.../MicroprofileLRALocalContainerInfraService.java` | Add 
`JAVA_TOOL_OPTIONS` env var to shorten recovery period |
   | `components/camel-lra/.../LRAFailuresIT.java` | Increase Awaitility 
timeout from 20s to 60s |
   | `components/camel-lra/.../AbstractLRATestSupport.java` | Increase 
`checkActiveLRAs` timeout from 2s to 20s |
   
   ## Test Plan
   
   - [ ] CI integration tests pass (LRAFailuresIT specifically)
   - [ ] Other LRA integration tests (LRACreditIT, LRAManualIT, LRAOptionsIT, 
LRATimeoutIT) still pass
   - [ ] No regression in test-infra module


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