Skip to content

CAMEL-23431: Migrate camel-grpc and camel-mllp tests from AvailablePortFinder to port-0 binding#23037

Draft
gnodet wants to merge 5 commits into
apache:mainfrom
gnodet:CAMEL-23431-port0-mllp
Draft

CAMEL-23431: Migrate camel-grpc and camel-mllp tests from AvailablePortFinder to port-0 binding#23037
gnodet wants to merge 5 commits into
apache:mainfrom
gnodet:CAMEL-23431-port0-mllp

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 7, 2026

CAMEL-23431

Migrate camel-grpc and camel-mllp tests from AvailablePortFinder to port-0 ServerSocket binding, eliminating TOCTOU race conditions that can cause flaky BindException failures.

Changes

camel-grpc

  • Add getLocalPort() to GrpcConsumer to expose the OS-assigned port after server start
  • Change port validation from > 0 to >= 0 to allow port 0 (OS-assigned)
  • Migrate all 14 test files to use port 0 and read back the actual port

camel-mllp

  • Add getLocalPort() to MllpTcpServerConsumer to expose the OS-assigned port
  • Migrate 6 test files to use port 0 and read back the actual port

Test plan

  • CI passes for camel-grpc tests
  • CI passes for camel-mllp tests
  • No regressions in other modules

@gnodet gnodet requested review from cunningt and gzurowski May 7, 2026 09:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🌟 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 added the core label May 7, 2026
@davsclaus
Copy link
Copy Markdown
Contributor

@gnodet can you update this PR as it has merge conflicts now

@gnodet gnodet force-pushed the CAMEL-23431-port0-mllp branch from 394bfb7 to 01bdf62 Compare May 13, 2026 10:39
@github-actions github-actions Bot removed the core label May 13, 2026
@gnodet gnodet force-pushed the CAMEL-23431-port0-mllp branch from a1136c6 to eb67835 Compare May 13, 2026 15:59
gnodet and others added 3 commits May 14, 2026 00:25
…rtFinder to port-0 binding

- Add getLocalPort() to GrpcConsumer to expose OS-assigned port
- Allow port 0 in GrpcConsumer by changing port check from > 0 to >= 0
- Add getLocalPort() to MllpTcpServerConsumer to expose OS-assigned port
- Migrate all grpc and mllp tests to use port 0 instead of AvailablePortFinder

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…hread

The serverSocket field is package-private, so access it via a public
getter instead of direct field access from MllpTcpServerConsumer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gnodet gnodet force-pushed the CAMEL-23431-port0-mllp branch 2 times, most recently from c660cc9 to 66a347e Compare May 13, 2026 22:43
…stion

gRPC uses java.util.logging internally and without a logging.properties
config, all gRPC framework messages go to console at INFO level, filling
the CI runner's diagnostic log and causing disk space failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gnodet gnodet force-pushed the CAMEL-23431-port0-mllp branch from 66a347e to a8a71b7 Compare May 13, 2026 23:20
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