[
https://issues.apache.org/jira/browse/CAMEL-23916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet resolved CAMEL-23916.
-------------------------------------
Resolution: Won't Fix
Closing as Won't Fix.
Investigation found that this test is not actually flaky:
- SamplingThrottler is fully synchronous (callback.done(true); return true;)
- The direct: endpoint processes messages synchronously — all messages are
delivered before assertions run
- 100 consecutive local runs of the original test: 0 failures
- No evidence of CI failures in build history
The Thread.sleep calls in this test serve as pacing delays (100ms between
messages) and period waits (1100ms to let the sampling period expire), not as
timing-sensitive async waits. Replacing them with Awaitility adds verbosity
without fixing a real problem.
PR #24442 has been closed.
_Claude Code on behalf of Christoph Deppisch_
> Fix flaky SamplingThrottlerTest in camel-core
> ---------------------------------------------
>
> Key: CAMEL-23916
> URL: https://issues.apache.org/jira/browse/CAMEL-23916
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Guillaume Nodet
> Priority: Major
> Labels: flaky-test
>
> The SamplingThrottlerTest in camel-core uses Thread.sleep(100) and
> Thread.sleep(1100) for timing synchronization, combined with
> setResultWaitTime(100) which is extremely tight. This makes the test prone to
> flakiness on slow CI machines.
> These Thread.sleep calls and setResultWaitTime usage should be replaced with
> Awaitility-based assertions per project guidelines.
> Affected file:
> core/camel-core/src/test/java/org/apache/camel/processor/SamplingThrottlerTest.java
--
This message was sent by Atlassian Jira
(v8.20.10#820010)