[
https://issues.apache.org/jira/browse/CAMEL-24035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18097651#comment-18097651
]
Omar Atie edited comment on CAMEL-24035 at 7/20/26 7:25 PM:
------------------------------------------------------------
Thanks for filing this. I looked into the three tests on current `main`.
*{*}Already addressed in CAMEL-24037{*}*
([#24635]([https://github.com/apache/camel/pull/24635]), merged 2026-07-13):
- *{*}TwoSchedulerTest{*}* — uses `MockEndpoint.assertIsSatisfied(context, 30,
TimeUnit.SECONDS)` and `assertEquals` for the thread-name comparison (no
`assertSame`).
- *{*}ThrottlingExceptionRoutePolicyOpenViaConfigTest{*}* — bare
`assertMockEndpointsSatisfied()` replaced with timed
`MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS)` on all mock
expectations.
- *{*}DistributedTimeoutTest{*}* — Awaitility wrapping of `MockEndpoint`
assertions removed; second phase uses
`MockEndpoint.assertIsSatisfied(context/context2, 30, TimeUnit.SECONDS)`.
*{*}Follow-up in CAMEL-24042{*}*
([#24650]([https://github.com/apache/camel/pull/24650)):] increased Awaitility
timeouts for non-mock waits (timeout callback invocation, consumer
suspend/resume).
*{*}Possible remaining gap in `DistributedTimeoutTest`:{*}* the first phase
still calls `mock.assertIsSatisfied()` / `mock2.assertIsSatisfied()` without an
explicit timeout (relies on the default 10 s). That may be acceptable, but for
consistency we could switch to
`MockEndpoint.assertIsSatisfied(context/context2, 30, TimeUnit.SECONDS)` there
too.
*{*}Proposal:{*}* close CAMEL-24035 as a duplicate of CAMEL-24037, unless CI is
still flaky on `DistributedTimeoutTest` — in which case I can open a small
follow-up PR for the first-phase timed assertions only.
—
_AI-generated draft on behalf of Omar Atie (`atiaomar1978-hub`)._
was (Author: JIRAUSER313980):
Draft JIRA comment for
[CAMEL-24035](https://issues.apache.org/jira/browse/CAMEL-24035):
---
Thanks for filing this. I looked into the three tests on current `main`.
**Already addressed in CAMEL-24037**
([#24635](https://github.com/apache/camel/pull/24635), merged 2026-07-13):
- **TwoSchedulerTest** — uses `MockEndpoint.assertIsSatisfied(context, 30,
TimeUnit.SECONDS)` and `assertEquals` for the thread-name comparison (no
`assertSame`).
- **ThrottlingExceptionRoutePolicyOpenViaConfigTest** — bare
`assertMockEndpointsSatisfied()` replaced with timed
`MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS)` on all mock
expectations.
- **DistributedTimeoutTest** — Awaitility wrapping of `MockEndpoint` assertions
removed; second phase uses `MockEndpoint.assertIsSatisfied(context/context2,
30, TimeUnit.SECONDS)`.
**Follow-up in CAMEL-24042**
([#24650](https://github.com/apache/camel/pull/24650)): increased Awaitility
timeouts for non-mock waits (timeout callback invocation, consumer
suspend/resume).
**Possible remaining gap in `DistributedTimeoutTest`:** the first phase still
calls `mock.assertIsSatisfied()` / `mock2.assertIsSatisfied()` without an
explicit timeout (relies on the default 10 s). That may be acceptable, but for
consistency we could switch to
`MockEndpoint.assertIsSatisfied(context/context2, 30, TimeUnit.SECONDS)` there
too.
**Proposal:** close CAMEL-24035 as a duplicate of CAMEL-24037, unless CI is
still flaky on `DistributedTimeoutTest` — in which case I can open a small
follow-up PR for the first-phase timed assertions only.
---
_AI-generated draft on behalf of Omar Atie (`atiaomar1978-hub`)._
> Fix flaky camel-core tests: TwoSchedulerTest, DistributedTimeoutTest,
> ThrottlingExceptionRoutePolicyOpenViaConfigTest
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24035
> URL: https://issues.apache.org/jira/browse/CAMEL-24035
> Project: Camel
> Issue Type: Test
> Components: camel-core
> Reporter: Guillaume Nodet
> Priority: Major
> Labels: test-flaky
>
> Several camel-core tests are flaky in CI due to timing issues:
> - TwoSchedulerTest: uses assertMockEndpointsSatisfied() without timeout, and
> assertSame for String comparison (should use assertEquals)
> - DistributedTimeoutTest: wraps MockEndpoint assertions with Awaitility
> (anti-pattern per project guidelines), needs direct timed assertions
> - ThrottlingExceptionRoutePolicyOpenViaConfigTest: uses
> assertMockEndpointsSatisfied() without timeout
> Fix by using MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS)
> timed assertions and correcting the String comparison.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)