This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new 76b0379bb Fix #2868: Use dynamic ports in AvroIT and ProtobufIT to 
avoid port conflicts
76b0379bb is described below

commit 76b0379bb3100055ef605f3af8760733798b442f
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Jun 22 21:40:27 2026 +0200

    Fix #2868: Use dynamic ports in AvroIT and ProtobufIT to avoid port 
conflicts
    
    Replace hardcoded port 8080 with SocketUtils.findAvailableTcpPort(),
    matching the pattern used by all other integration test classes.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 tests/camel-kamelets-itest/src/test/java/AvroIT.java     | 3 ++-
 tests/camel-kamelets-itest/src/test/java/ProtobufIT.java | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/camel-kamelets-itest/src/test/java/AvroIT.java 
b/tests/camel-kamelets-itest/src/test/java/AvroIT.java
index 5ee2dbcec..41e7be04b 100644
--- a/tests/camel-kamelets-itest/src/test/java/AvroIT.java
+++ b/tests/camel-kamelets-itest/src/test/java/AvroIT.java
@@ -23,6 +23,7 @@ import org.citrusframework.junit.jupiter.CitrusSupport;
 import org.citrusframework.junit.jupiter.CitrusTestFactory;
 import org.citrusframework.junit.jupiter.CitrusTestFactorySupport;
 import org.citrusframework.spi.BindToRegistry;
+import org.citrusframework.util.SocketUtils;
 import org.junit.jupiter.api.DynamicTest;
 
 import static 
org.citrusframework.actions.CreateVariablesAction.Builder.createVariables;
@@ -30,7 +31,7 @@ import static 
org.citrusframework.actions.CreateVariablesAction.Builder.createVa
 @CitrusSupport
 public class AvroIT {
 
-    private final int avroWebhookPort = 8080;
+    private final int avroWebhookPort = SocketUtils.findAvailableTcpPort();
 
     @BindToRegistry
     public SequenceBeforeTest beforeAvro() {
diff --git a/tests/camel-kamelets-itest/src/test/java/ProtobufIT.java 
b/tests/camel-kamelets-itest/src/test/java/ProtobufIT.java
index ee94c306b..c75c1e186 100644
--- a/tests/camel-kamelets-itest/src/test/java/ProtobufIT.java
+++ b/tests/camel-kamelets-itest/src/test/java/ProtobufIT.java
@@ -23,6 +23,7 @@ import org.citrusframework.junit.jupiter.CitrusSupport;
 import org.citrusframework.junit.jupiter.CitrusTestFactory;
 import org.citrusframework.junit.jupiter.CitrusTestFactorySupport;
 import org.citrusframework.spi.BindToRegistry;
+import org.citrusframework.util.SocketUtils;
 import org.junit.jupiter.api.DynamicTest;
 
 import static 
org.citrusframework.actions.CreateVariablesAction.Builder.createVariables;
@@ -30,7 +31,7 @@ import static 
org.citrusframework.actions.CreateVariablesAction.Builder.createVa
 @CitrusSupport
 public class ProtobufIT {
 
-    private final int protobufWebhookPort = 8080;
+    private final int protobufWebhookPort = SocketUtils.findAvailableTcpPort();
 
     @BindToRegistry
     public SequenceBeforeTest beforeProtobuf() {

Reply via email to