Skip to content

CAMEL-22635: Fix LogCaptureTest in camel-netty and camel-netty-http#22083

Merged
gnodet merged 2 commits intomainfrom
CAMEL-22635
Mar 19, 2026
Merged

CAMEL-22635: Fix LogCaptureTest in camel-netty and camel-netty-http#22083
gnodet merged 2 commits intomainfrom
CAMEL-22635

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 18, 2026

Summary

  • Programmatically attach LogCaptureAppender to the logger in setUp/tearDown instead of relying on configuration.packages plugin discovery in log4j2.properties (deprecated in Log4j2 2.x)
  • Remove @Disabled annotation from both camel-netty and camel-netty-http LogCaptureTest
  • Clean up log4j2.properties — remove broken appender reference that caused NPE at startup
  • Add @Isolated to prevent interference with other tests

Test plan

  • LogCaptureTest passes in camel-netty
  • LogCaptureTest passes in camel-netty-http
  • CI green

The LogCaptureAppender was disabled because the Log4j2 plugin
discovery via configuration.packages no longer works reliably.

Fix by programmatically attaching the appender to the logger
in setUp/tearDown, removing the dependency on log4j2.properties
plugin configuration. Also remove @disabled annotation and add
@isolated to prevent interference with other tests.

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.

@github-actions
Copy link
Contributor

🧪 CI tested the following changed modules:

  • components/camel-netty-http
  • components/camel-netty
Full reactor (4 modules)
  • Camel :: Netty
  • Camel :: Netty [jar]
  • Camel :: Netty HTTP
  • Camel :: Netty HTTP [jar]

@apupier
Copy link
Contributor

apupier commented Mar 18, 2026

/component-test netty netty-http

@github-actions
Copy link
Contributor

/component-test netty netty-http tests passed successfully.

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

  • components/camel-netty: 1 test(s) disabled on GitHub Actions

@gnodet gnodet merged commit 2a88fb6 into main Mar 19, 2026
5 checks passed
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