You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/05/06 08:24:44 UTC

[PR] CAMEL-13629: Fix and re-enable flaky DisruptorReconfigureWithBlockingProducerTest [camel]

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

   [CAMEL-13629](https://issues.apache.org/jira/browse/CAMEL-13629)
   
   ## Summary
   
   - Fix and re-enable `DisruptorReconfigureWithBlockingProducerTest`, which has been `@Disabled` since 2019
   
   ## Root causes of flakiness
   
   1. **Fragile wall-clock timing assertion** (`watch.taken() < 2000`): only 400ms margin over the theoretical 1600ms drain time, easily exceeded on slow CI machines
   2. **Race between producer and reconfiguration**: the `ConsumerEventHandler` processes events asynchronously (calls `processor.process()` with a no-op callback and returns immediately), so the ring buffer drains in microseconds. The producer could send all 12 messages to the OLD disruptor before `addRoutes()` nullified the reference, causing `mock:b` to receive far fewer messages than expected
   3. **Non-volatile `exception` field** across threads and tight 5-second timeouts
   
   ## Changes
   
   - Remove `@Disabled` annotation to re-enable the test
   - Use explicit `CountDownLatch` synchronization: producer sends a first batch of 8 messages, signals, then waits for reconfiguration to complete before sending the second batch of 12 messages. This ensures the second batch deterministically goes through both consumers
   - Use `blockWhenFull=true` on the producer URI (matching the test's name)
   - Remove the fragile `StopWatch` timing assertion
   - Make `exception` field `volatile` for proper cross-thread visibility
   - Increase timeouts to generous values (10s/30s) and add explicit timeout to `MockEndpoint.assertIsSatisfied`
   - Add proper error handling with `finally` for `resultLatch`
   
   Verified stable with 10/10 consecutive passes locally and full disruptor test suite (102 tests).


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-13629: Fix and re-enable flaky DisruptorReconfigureWithBlockingProducerTest [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22989:
URL: https://github.com/apache/camel/pull/22989#issuecomment-4386392927

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `components/camel-disruptor`
   
   <details><summary>All tested modules (8 modules)</summary>
   
   - Camel :: Disruptor
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Launcher :: Container
   - Camel :: YAML DSL :: Validator
   - Camel :: YAML DSL :: Validator Maven Plugin
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/25424469322)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23437: Fix and re-enable flaky DisruptorReconfigureWithBlockingProducerTest [camel]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #22989:
URL: https://github.com/apache/camel/pull/22989


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-13629: Fix and re-enable flaky DisruptorReconfigureWithBlockingProducerTest [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22989:
URL: https://github.com/apache/camel/pull/22989#issuecomment-4386279910

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org