Skip to content

CAMEL-23903: Fix flaky test RouteIdTransactedIT in camel-jms#24420

Draft
gnodet wants to merge 1 commit into
apache:mainfrom
gnodet:camel-23903-fix-flaky-test-routeidtransactedit-in
Draft

CAMEL-23903: Fix flaky test RouteIdTransactedIT in camel-jms#24420
gnodet wants to merge 1 commit into
apache:mainfrom
gnodet:camel-23903-fix-flaky-test-routeidtransactedit-in

Conversation

@gnodet

@gnodet gnodet commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix flaky RouteIdTransactedIT.testRouteIdFailed (and testRouteId for consistency) by replacing MockEndpoint.assertIsSatisfied(context) with Awaitility's untilAsserted().

Root cause: The default MockEndpoint latch timeout is 10 seconds (waitForCompleteLatch defaults to 10s when resultWaitTime=0). In transacted JMS routes under CI load on JDK 17, the message processing (including transaction handling and exception routing via onException) can exceed this timeout, causing intermittent test failures.

Fix: Wrap mock endpoint assertions with Awaitility.await().atMost(30, TimeUnit.SECONDS).untilAsserted(...) to give transacted routes a generous 30-second window. This follows the same Awaitility pattern already used elsewhere in camel-jms tests (e.g., JmsAutoStartupTest, JmsDeliveryDelayTest).

Test plan

  • RouteIdTransactedIT passes (2 tests, 0 failures)
  • CI build passes

Claude Code on behalf of Guillaume Nodet

🤖 Generated with Claude Code

Replace MockEndpoint.assertIsSatisfied(context) with Awaitility's
untilAsserted() in both testRouteId() and testRouteIdFailed() to
provide a generous 30-second timeout for transacted JMS message
processing, which can exceed the default 10-second latch timeout
under CI load on JDK 17.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Guillaume Nodet <gnodet@gmail.com>
@gnodet gnodet requested review from davsclaus and orpiske July 4, 2026 17:03
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 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 have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • components/camel-jms

🔬 Scalpel shadow comparison — Scalpel: 1 tested, 0 compile-only — current: 12 all tested

Maveniverse Scalpel detected 1 affected modules (current approach: 12).

Modules only in current approach (11)
  • camel-activemq
  • camel-activemq6
  • camel-amqp
  • camel-jbang-mcp
  • camel-jbang-plugin-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

Skip-tests mode would test 1 modules (1 direct + 0 downstream), skip tests for 0 (generated code, meta-modules)

Modules Scalpel would test (1)
  • camel-jms

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • components/camel-jms: 1 test(s) disabled on GitHub Actions
All tested modules (12 modules)
  • Camel :: AMQP
  • Camel :: ActiveMQ 5.x
  • Camel :: ActiveMQ 6.x
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JMS
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants