Repository: camel
Updated Branches:
  refs/heads/master 8743dd8ba -> f2dcfa45a


Polished test


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

Branch: refs/heads/master
Commit: 7ba05c98148a0712af674d6500ea91b2f526fc79
Parents: 8743dd8
Author: Claus Ibsen <davscl...@apache.org>
Authored: Thu Dec 8 17:29:53 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Thu Dec 8 17:29:53 2016 +0100

----------------------------------------------------------------------
 .../http/NettyHttpProducerSessionTest.java      | 23 ++++++--------------
 1 file changed, 7 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7ba05c98/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSessionTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSessionTest.java
 
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSessionTest.java
index b5f55d1..ae587bf 100644
--- 
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSessionTest.java
+++ 
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSessionTest.java
@@ -61,36 +61,27 @@ public class NettyHttpProducerSessionTest extends 
BaseNettyTest {
         return jndiRegistry;
     }
 
-    private String getTestServerEndpointSessionUrl() {
-        // session handling will not work for localhost
-        return "http://127.0.0.1:"; + getPort() + "/session";
-    }
-
-    private String getTestServerEndpointSessionUri() {
-        return "jetty:" + getTestServerEndpointSessionUrl() + 
"?sessionSupport=true";
-    }
-
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
                 from("direct:start")
-                    .to("netty4-http:" + getTestServerEndpointSessionUrl())
-                    .to("netty4-http:" + getTestServerEndpointSessionUrl())
+                    .toF("netty4-http:http://127.0.0.1:%d/session";, getPort())
+                    .toF("netty4-http:http://127.0.0.1:%d/session";, getPort())
                     .to("mock:result");
 
                 from("direct:instance")
-                    .to("netty4-http:" + getTestServerEndpointSessionUrl() + 
"?cookieHandler=#instanceCookieHandler")
-                    .to("netty4-http:" + getTestServerEndpointSessionUrl() + 
"?cookieHandler=#instanceCookieHandler")
+                    
.toF("netty4-http:http://127.0.0.1:%d/session?cookieHandler=#instanceCookieHandler";,
 getPort())
+                    
.toF("netty4-http:http://127.0.0.1:%d/session?cookieHandler=#instanceCookieHandler";,
 getPort())
                     .to("mock:result");
 
                 from("direct:exchange")
-                    .to("netty4-http:" + getTestServerEndpointSessionUrl() + 
"?cookieHandler=#exchangeCookieHandler")
-                    .to("netty4-http:" + getTestServerEndpointSessionUrl() + 
"?cookieHandler=#exchangeCookieHandler")
+                    
.toF("netty4-http:http://127.0.0.1:%d/session?cookieHandler=#exchangeCookieHandler";,
 getPort())
+                    
.toF("netty4-http:http://127.0.0.1:%d/session?cookieHandler=#exchangeCookieHandler";,
 getPort())
                     .to("mock:result");
 
-                from(getTestServerEndpointSessionUri())
+                fromF("jetty:http://127.0.0.1:%d/session?sessionSupport=true";, 
getPort())
                     .process(new Processor() {
                         @Override
                         public void process(Exchange exchange) throws 
Exception {

Reply via email to