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

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


The following commit(s) were added to refs/heads/main by this push:
     new a68935f  (chores) camel-soroush: avoid using fixed ports for the tests
a68935f is described below

commit a68935f5b0cdabb910cbd0b8a770006800f08464
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Fri Nov 19 10:40:57 2021 +0100

    (chores) camel-soroush: avoid using fixed ports for the tests
---
 .../apache/camel/component/soroushbot/support/SoroushMockServer.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-soroush/src/test/java/org/apache/camel/component/soroushbot/support/SoroushMockServer.java
 
b/components/camel-soroush/src/test/java/org/apache/camel/component/soroushbot/support/SoroushMockServer.java
index 7a09401..fe32c30 100644
--- 
a/components/camel-soroush/src/test/java/org/apache/camel/component/soroushbot/support/SoroushMockServer.java
+++ 
b/components/camel-soroush/src/test/java/org/apache/camel/component/soroushbot/support/SoroushMockServer.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.soroushbot.support;
 
+import org.apache.camel.test.AvailablePortFinder;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
@@ -26,7 +27,7 @@ public class SoroushMockServer extends Thread {
     private static final Logger LOG = 
LoggerFactory.getLogger(SoroushMockServer.class);
 
     private Server jettyServer;
-    private Integer port = 8080;
+    private Integer port = AvailablePortFinder.getNextAvailable();
 
     @Override
     public void start() {

Reply via email to