Skip to content

Use per-class queue names in JMS tests to prevent shared broker interference#22138

Merged
gnodet merged 1 commit intoapache:mainfrom
gnodet:fix-jms-shared-queues
Mar 20, 2026
Merged

Use per-class queue names in JMS tests to prevent shared broker interference#22138
gnodet merged 1 commit intoapache:mainfrom
gnodet:fix-jms-shared-queues

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 20, 2026

Summary

  • Append test class simple name to queue names (inbox, outbox, DLQ, foo, bar, valid, invalid, finally) in 17 JMS test files
  • Prevents cross-test message leakage when tests share an embedded Artemis broker with hardcoded queue names
  • Fixes flaky test failures observed during parallel execution (e.g., stale messages from prior tests polluting assertions)
  • Also configures per-class DLQ address in JmsToJmsTransactedIT to avoid DLQ collisions

Changed files

  • 8 Spring TX async tests (AsyncEndpointJmsTX*IT.java)
  • JmsComponentTransactedCacheLevelNameTest, AsyncJmsInOutTest, JmsTypeConverterIssueIT
  • JmsValidatorTest + JmsSpringValidatorIT (Java + XML config)
  • JmsToJmsTransactedIT (per-class DLQ)
  • RemoveEndpointsTest, JmsJettyAsyncTest (camel-itest)

Test plan

  • Compilation verified locally
  • CI runs all affected JMS tests

…ference

Tests sharing an embedded Artemis broker with hardcoded queue names (inbox,
outbox, DLQ, etc.) can interfere with each other during parallel execution.
Append the test class simple name to each queue name so each test class uses
its own isolated queues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
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 build-all, build-dependents, 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.

@gnodet gnodet merged commit 76050ab into apache:main Mar 20, 2026
5 checks passed
@gnodet gnodet deleted the fix-jms-shared-queues branch March 20, 2026 08:57
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