camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-9908: Removing jetty 8
Date Tue, 26 Apr 2016 18:14:12 GMT
Repository: camel
Updated Branches:
  refs/heads/master 8abac1438 -> 81a0f01df


CAMEL-9908: Removing jetty 8


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/81a0f01d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/81a0f01d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/81a0f01d

Branch: refs/heads/master
Commit: 81a0f01df4d52891bbd0ecf17823c9e9cecff0f5
Parents: 8abac14
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Apr 26 20:14:03 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Apr 26 20:14:03 2016 +0200

----------------------------------------------------------------------
 components/camel-atom/pom.xml                                  | 4 ++--
 .../java/org/apache/camel/component/atom/JettyTestServer.java  | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/81a0f01d/components/camel-atom/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-atom/pom.xml b/components/camel-atom/pom.xml
index 635432f..43c2ee9 100644
--- a/components/camel-atom/pom.xml
+++ b/components/camel-atom/pom.xml
@@ -198,13 +198,13 @@
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
       <artifactId>jetty-servlet</artifactId>
-      <version>${jetty8-version}</version>
+      <version>${jetty9-version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
       <artifactId>jetty-security</artifactId>
-      <version>${jetty8-version}</version>
+      <version>${jetty9-version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/camel/blob/81a0f01d/components/camel-atom/src/test/java/org/apache/camel/component/atom/JettyTestServer.java
----------------------------------------------------------------------
diff --git a/components/camel-atom/src/test/java/org/apache/camel/component/atom/JettyTestServer.java
b/components/camel-atom/src/test/java/org/apache/camel/component/atom/JettyTestServer.java
index 81ac513..ad67bc8 100644
--- a/components/camel-atom/src/test/java/org/apache/camel/component/atom/JettyTestServer.java
+++ b/components/camel-atom/src/test/java/org/apache/camel/component/atom/JettyTestServer.java
@@ -23,6 +23,7 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.camel.test.AvailablePortFinder;
 import org.apache.commons.io.FileUtils;
 import org.eclipse.jetty.security.ConstraintMapping;
 import org.eclipse.jetty.security.ConstraintSecurityHandler;
@@ -42,6 +43,7 @@ import static org.junit.Assert.fail;
 public final class JettyTestServer {
 
     private static final Logger LOG = LoggerFactory.getLogger(JettyTestServer.class);
+    protected static final int PORT = AvailablePortFinder.getNextAvailable();
     private static JettyTestServer instance;
 
     public int port;
@@ -51,7 +53,8 @@ public final class JettyTestServer {
     }
 
     public void startServer() {
-        server = new Server(0);
+        server = new Server(PORT);
+        port = PORT;
 
         ServletContextHandler servletContext = new ServletContextHandler(ServletContextHandler.SESSIONS);
         servletContext.setSecurityHandler(basicAuth("camel", "camelPass", "Private!"));
@@ -64,7 +67,6 @@ public final class JettyTestServer {
             LOG.error("Could not start Server!", ex);
             fail(ex.getLocalizedMessage());
         }
-        port = server.getConnectors()[0].getLocalPort();
     }
 
     public void stopServer() {


Mime
View raw message