You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/03/19 08:46:03 UTC

[PR] CAMEL-22525: Fix flaky AS2 tests with BindException [camel]

gnodet opened a new pull request, #22095:
URL: https://github.com/apache/camel/pull/22095

   ## Summary
   
   - Fix flaky AS2 tests that intermittently fail with `BindException: Address already in use` on CI
   - Root cause: `new ServerSocket(port)` doesn't set `SO_REUSEADDR`, so if a port is in `TIME_WAIT` state from a previous test, binding fails
   - Fix: create unbound `ServerSocket`, set `SO_REUSEADDR` to `true`, then bind — in both `AS2ServerConnection` and `AS2AsyncMDNServerConnection`
   
   ## Test plan
   
   - [x] `mvn test -B -pl components/camel-as2/camel-as2-api`
   - [x] Verified the socket options are correctly applied
   
   Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-22525: Fix flaky AS2 tests with BindException [camel]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #22095:
URL: https://github.com/apache/camel/pull/22095#discussion_r2958649078


##########
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2AsyncMDNServerConnection.java:
##########
@@ -123,11 +124,13 @@ public void handle(
         public RequestListenerThread(int port, SSLContext sslContext) throws IOException {

Review Comment:
   What is the point of keeping the port here if it is no longer used ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-22525: Fix flaky AS2 tests with BindException [camel]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #22095:
URL: https://github.com/apache/camel/pull/22095


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-22525: Fix flaky AS2 tests with BindException [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22095:
URL: https://github.com/apache/camel/pull/22095#issuecomment-4088772179

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `components/camel-as2/camel-as2-api`
   
   <details><summary>Full reactor (74 modules)</summary>
   
   - Camel :: AS2 :: API
   - Camel :: AS2 :: API                                                [jar]
   - Camel :: AS2 :: Component
   - Camel :: AS2 :: Component                                          [jar]
   - Camel :: All Components Sync point
   - Camel :: All Components Sync point                                 [pom]
   - Camel :: Assembly
   - Camel :: Assembly                                                  [pom]
   - Camel :: Catalog :: CSimple Maven Plugin (deprecated)     [maven-plugin]
   - Camel :: Catalog :: CSimple Maven Plugin (deprecated) SUCCESS [  0.902 s]
   - Camel :: Catalog :: Camel Catalog
   - Camel :: Catalog :: Camel Catalog                                  [jar]
   - Camel :: Catalog :: Camel Report Maven Plugin
   - Camel :: Catalog :: Camel Report Maven Plugin             [maven-plugin]
   - Camel :: Catalog :: Camel Route Parser
   - Camel :: Catalog :: Camel Route Parser                             [jar]
   - Camel :: Catalog :: Console
   - Camel :: Catalog :: Console                                        [jar]
   - Camel :: Catalog :: Dummy Component
   - Camel :: Catalog :: Dummy Component                                [jar]
   - Camel :: Catalog :: Lucene (deprecated)
   - Camel :: Catalog :: Lucene (deprecated)                            [jar]
   - Camel :: Catalog :: Maven
   - Camel :: Catalog :: Maven                                          [jar]
   - Camel :: Catalog :: Suggest
   - Camel :: Catalog :: Suggest                                        [jar]
   - Camel :: Component DSL
   - Camel :: Component DSL                                             [jar]
   - Camel :: Coverage
   - Camel :: Coverage                                                  [pom]
   - Camel :: Docs
   - Camel :: Docs                                                      [pom]
   - Camel :: Endpoint DSL
   - Camel :: Endpoint DSL                                              [jar]
   - Camel :: Endpoint DSL :: Support
   - Camel :: Endpoint DSL :: Support                                   [jar]
   - Camel :: Integration Tests
   - Camel :: Integration Tests                                         [jar]
   - Camel :: JBang :: Core
   - Camel :: JBang :: Core                                             [jar]
   - Camel :: JBang :: Integration tests
   - Camel :: JBang :: Integration tests                                [jar]
   - Camel :: JBang :: MCP
   - Camel :: JBang :: MCP                                              [jar]
   - Camel :: JBang :: Main
   - Camel :: JBang :: Main                                             [jar]
   - Camel :: JBang :: Plugin :: Edit
   - Camel :: JBang :: Plugin :: Edit                                   [jar]
   - Camel :: JBang :: Plugin :: Generate
   - Camel :: JBang :: Plugin :: Generate                               [jar]
   - Camel :: JBang :: Plugin :: Kubernetes
   - Camel :: JBang :: Plugin :: Kubernetes                             [jar]
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: Route Parser                           [jar]
   - Camel :: JBang :: Plugin :: Testing
   - Camel :: JBang :: Plugin :: Testing                                [jar]
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: JBang :: Plugin :: Validate                               [jar]
   - Camel :: Kamelet Main
   - Camel :: Kamelet Main                                              [jar]
   - Camel :: Launcher
   - Camel :: Launcher                                                  [jar]
   - Camel :: Launcher :: Container
   - Camel :: Launcher :: Container                                     [pom]
   - Camel :: YAML DSL
   - Camel :: YAML DSL                                                  [jar]
   - Camel :: YAML DSL :: Deserializers
   - Camel :: YAML DSL :: Deserializers                                 [jar]
   - Camel :: YAML DSL :: Maven Plugins
   - Camel :: YAML DSL :: Maven Plugins                        [maven-plugin]
   - Camel :: YAML DSL :: Validator
   - Camel :: YAML DSL :: Validator                                     [jar]
   - Camel :: YAML DSL :: Validator Maven Plugin
   - Camel :: YAML DSL :: Validator Maven Plugin               [maven-plugin]
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-22525: Fix flaky AS2 tests with BindException [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22095:
URL: https://github.com/apache/camel/pull/22095#issuecomment-4088652058

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: 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](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-22525: Fix flaky AS2 tests with BindException [camel]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #22095:
URL: https://github.com/apache/camel/pull/22095#discussion_r2958649078


##########
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2AsyncMDNServerConnection.java:
##########
@@ -123,11 +124,13 @@ public void handle(
         public RequestListenerThread(int port, SSLContext sslContext) throws IOException {

Review Comment:
   What is the point of keeping the port here if it is no longer used ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org