gnodet commented on PR #25148:
URL: https://github.com/apache/camel/pull/25148#issuecomment-5115283554

   _Claude Code on behalf of forgebot-oss_
   
   Great detective work @apupier — the Develocity data pinpoints the root cause 
precisely.
   
   ## Root Cause
   
   The flakiness was introduced by **36fc371f30d** (CAMEL-21933, July 23) which 
re-enabled 3 previously-`@Disabled` tests: `EventbridgePutRuleIT`, 
`EventbridgePutEventsIT`, `EventbridgeRemoveTargetsIT`.
   
   Before that commit, only 5 EventBridge tests ran. After it, 8 tests run — 
all sharing:
   - The **same singleton floci container**
   - The **same hardcoded rule name** `"firstrule"`
   - **No `@BeforeEach` cleanup** between test classes
   
   When JUnit picks a different execution order, leftover rules from one test 
class cause assertions in subsequent test classes to fail (wrong rule count, 
wrong rule state, etc.). The `apache5-client` migration (85b160636e3, July 22) 
is **not** the cause — the Develocity chart shows tests were still stable that 
day.
   
   ## Why our fix addresses the root cause
   
   The `@BeforeEach` cleanup + write-based readiness probe in 
`Aws2EventbridgeBase` directly solves the shared-state interference introduced 
by running more test classes against the same container:
   
   1. **Write-based readiness probe** — confirms `putRule` works (not just 
`listRules`) before tests run, addressing the service initialization timing gap
   2. **Pre-test cleanup** — removes all rules from the default event bus 
before each test class, isolating tests from leftover state regardless of 
execution order
   
   This is the standard pattern used by other stable AWS tests in this project 
(e.g., SQS, SNS, S3 all have cleanup in their base classes).


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