You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/01/16 11:59:36 UTC

[1/2] camel git commit: Remove unecessary inline import

Repository: camel
Updated Branches:
  refs/heads/master ebd93ccf3 -> 30b298435


Remove unecessary inline import


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

Branch: refs/heads/master
Commit: 59a395409d1a04435e4cf45b266788eea49621c7
Parents: ebd93cc
Author: Antonin Stefanutti <an...@stefanutti.fr>
Authored: Fri Jan 15 18:46:22 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jan 16 11:58:25 2016 +0100

----------------------------------------------------------------------
 components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/59a39540/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java
----------------------------------------------------------------------
diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java b/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java
index cd55010..69c9bfe 100644
--- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java
+++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java
@@ -26,6 +26,7 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.main.MainSupport;
 import org.apache.deltaspike.cdise.api.CdiContainer;
+import org.apache.deltaspike.cdise.api.CdiContainerLoader;
 
 /**
  * Camel CDI boot integration. Allows Camel and CDI to be booted up on the command line as a JVM process.
@@ -85,7 +86,7 @@ public class Main extends MainSupport {
     @Override
     protected void doStart() throws Exception {
         // TODO: Use standard CDI Java SE support when CDI 2.0 becomes a prerequisite
-        org.apache.deltaspike.cdise.api.CdiContainer container = org.apache.deltaspike.cdise.api.CdiContainerLoader.getCdiContainer();
+        CdiContainer container = CdiContainerLoader.getCdiContainer();
         container.boot();
         container.getContextControl().startContexts();
         cdiContainer = container;


[2/2] camel git commit: Fix camel-netty-http unit tests that use 0.0.0.0 as target address

Posted by da...@apache.org.
Fix camel-netty-http unit tests that use 0.0.0.0 as target address


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

Branch: refs/heads/master
Commit: 30b298435c0babfaecc2ee1820af5b2a94448b5b
Parents: 59a3954
Author: Andreas Veithen <ve...@google.com>
Authored: Fri Jan 15 19:11:41 2016 +0000
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jan 16 11:58:26 2016 +0100

----------------------------------------------------------------------
 .../component/netty/http/NettyHttpCompressTest.java     |  2 +-
 .../component/netty/http/NettyHttpContentTypeTest.java  | 12 ++++++------
 .../netty/http/NettyHttpProducerBridgeTest.java         |  4 ++--
 .../netty/http/NettyHttpProducerQueryParamTest.java     |  2 +-
 .../netty/http/NettyMixedCaseHttpPathTest.java          |  2 +-
 .../netty/http/NettyProxyMixedCasePathTest.java         |  6 +++---
 .../netty/http/NettyRecipientListHttpBaseTest.java      |  2 +-
 .../component/netty/http/NettyRouteSimpleTest.java      |  2 +-
 8 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/30b29843/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpCompressTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpCompressTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpCompressTest.java
index f642b13..700f98a 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpCompressTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpCompressTest.java
@@ -48,7 +48,7 @@ public class NettyHttpCompressTest extends BaseNettyTest {
         Map<String, Object> headers = new HashMap<String, Object>();
         headers.put("content-type", "text/plain; charset=\"UTF-8\"");
         headers.put("Accept-Encoding", "compress, gzip");
-        String out = template.requestBodyAndHeaders("netty-http:http://0.0.0.0:9001/foo?decoders=#myDecoders", data,
+        String out = template.requestBodyAndHeaders("netty-http:http://localhost:9001/foo?decoders=#myDecoders", data,
                 headers, String.class);
         // The decoded out has some space to clean up.
         assertEquals("Bye World", out.trim());

http://git-wip-us.apache.org/repos/asf/camel/blob/30b29843/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpContentTypeTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpContentTypeTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpContentTypeTest.java
index 8499c52..2f788ad 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpContentTypeTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpContentTypeTest.java
@@ -29,11 +29,11 @@ public class NettyHttpContentTypeTest extends BaseNettyTest {
         getMockEndpoint("mock:input").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.CONTENT_TYPE, "text/plain; charset=\"iso-8859-1\"");
         getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_CHARACTER_ENCODING, "iso-8859-1");
-        getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_URL, "http://0.0.0.0:" + getPort() + "/foo");
+        getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_URL, "http://localhost:" + getPort() + "/foo");
         getMockEndpoint("mock:input").expectedPropertyReceived(Exchange.CHARSET_NAME, "iso-8859-1");
 
         byte[] data = "Hello World".getBytes(Charset.forName("iso-8859-1"));
-        String out = template.requestBodyAndHeader("netty-http:http://0.0.0.0:{{port}}/foo", data,
+        String out = template.requestBodyAndHeader("netty-http:http://localhost:{{port}}/foo", data,
                 "content-type", "text/plain; charset=\"iso-8859-1\"", String.class);
         assertEquals("Bye World", out);
 
@@ -45,11 +45,11 @@ public class NettyHttpContentTypeTest extends BaseNettyTest {
         getMockEndpoint("mock:input").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.CONTENT_TYPE, "text/plain;charset=\"iso-8859-1\";action=\"http://somewhere.com/foo\"");
         getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_CHARACTER_ENCODING, "iso-8859-1");
-        getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_URL, "http://0.0.0.0:" + getPort() + "/foo");
+        getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_URL, "http://localhost:" + getPort() + "/foo");
         getMockEndpoint("mock:input").expectedPropertyReceived(Exchange.CHARSET_NAME, "iso-8859-1");
 
         byte[] data = "Hello World".getBytes(Charset.forName("iso-8859-1"));
-        String out = template.requestBodyAndHeader("netty-http:http://0.0.0.0:{{port}}/foo", data,
+        String out = template.requestBodyAndHeader("netty-http:http://localhost:{{port}}/foo", data,
                 "content-type", "text/plain;charset=\"iso-8859-1\";action=\"http://somewhere.com/foo\"", String.class);
         assertEquals("Bye World", out);
 
@@ -61,11 +61,11 @@ public class NettyHttpContentTypeTest extends BaseNettyTest {
         getMockEndpoint("mock:input").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.CONTENT_TYPE, "application/soap+xml;charset=\"utf-8\";action=\"http://somewhere.com/foo\"");
         getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_CHARACTER_ENCODING, "utf-8");
-        getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_URL, "http://0.0.0.0:" + getPort() + "/foo");
+        getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_URL, "http://localhost:" + getPort() + "/foo");
         getMockEndpoint("mock:input").expectedPropertyReceived(Exchange.CHARSET_NAME, "utf-8");
 
         byte[] data = "Hello World".getBytes(Charset.forName("utf-8"));
-        String out = template.requestBodyAndHeader("netty-http:http://0.0.0.0:{{port}}/foo", data,
+        String out = template.requestBodyAndHeader("netty-http:http://localhost:{{port}}/foo", data,
                 "content-type", "application/soap+xml;charset=\"utf-8\";action=\"http://somewhere.com/foo\"", String.class);
         assertEquals("Bye World", out);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/30b29843/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerBridgeTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerBridgeTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerBridgeTest.java
index 95109f4..f6e454c 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerBridgeTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerBridgeTest.java
@@ -26,7 +26,7 @@ public class NettyHttpProducerBridgeTest extends BaseNettyTest {
 
     @Test
     public void testProxy() throws Exception {
-        String reply = template.requestBody("netty-http:http://0.0.0.0:" + port1 + "/foo", "World", String.class);
+        String reply = template.requestBody("netty-http:http://localhost:" + port1 + "/foo", "World", String.class);
         assertEquals("Bye World", reply);
     }
 
@@ -39,7 +39,7 @@ public class NettyHttpProducerBridgeTest extends BaseNettyTest {
                 port2 = getNextPort();
 
                 from("netty-http:http://0.0.0.0:" + port1 + "/foo")
-                        .to("netty-http:http://0.0.0.0:" + port2 + "/bar?bridgeEndpoint=true&throwExceptionOnFailure=false");
+                        .to("netty-http:http://localhost:" + port2 + "/bar?bridgeEndpoint=true&throwExceptionOnFailure=false");
 
                 from("netty-http:http://0.0.0.0:" + port2 + "/bar")
                         .transform().simple("Bye ${body}");

http://git-wip-us.apache.org/repos/asf/camel/blob/30b29843/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerQueryParamTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerQueryParamTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerQueryParamTest.java
index f7f2fbb..c792b4d 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerQueryParamTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerQueryParamTest.java
@@ -25,7 +25,7 @@ import org.junit.Test;
 
 public class NettyHttpProducerQueryParamTest extends BaseNettyTest {
 
-    private String url = "netty-http:http://0.0.0.0:" + getPort() + "/cheese?urlDecodeHeaders=true";
+    private String url = "netty-http:http://localhost:" + getPort() + "/cheese?urlDecodeHeaders=true";
 
     @Test
     public void testQueryParameters() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/30b29843/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyMixedCaseHttpPathTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyMixedCaseHttpPathTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyMixedCaseHttpPathTest.java
index 0c0abe5..22b4f9b 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyMixedCaseHttpPathTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyMixedCaseHttpPathTest.java
@@ -26,7 +26,7 @@ public class NettyMixedCaseHttpPathTest extends BaseNettyTest {
     public void testMixedCase() throws Exception {
         getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_PATH, "/HelloWorld");
 
-        String out = template.requestBody("netty-http:http://0.0.0.0:{{port}}/SHoppING/HelloWorld", "Camel", String.class);
+        String out = template.requestBody("netty-http:http://localhost:{{port}}/SHoppING/HelloWorld", "Camel", String.class);
         assertEquals("Bye Camel", out);
 
         assertMockEndpointsSatisfied();

http://git-wip-us.apache.org/repos/asf/camel/blob/30b29843/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyProxyMixedCasePathTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyProxyMixedCasePathTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyProxyMixedCasePathTest.java
index 4aaf0d9..0ae92cd 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyProxyMixedCasePathTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyProxyMixedCasePathTest.java
@@ -23,10 +23,10 @@ public class NettyProxyMixedCasePathTest extends BaseNettyTest {
 
     @Test
     public void testMixedCase() throws Exception {
-        String out = template.requestBody("netty-http:http://0.0.0.0:{{port}}/Shopping", "Camel", String.class);
+        String out = template.requestBody("netty-http:http://localhost:{{port}}/Shopping", "Camel", String.class);
         assertEquals("Bye Camel", out);
 
-        out = template.requestBody("netty-http:http://0.0.0.0:{{port}}/shopping", "World", String.class);
+        out = template.requestBody("netty-http:http://localhost:{{port}}/shopping", "World", String.class);
         assertEquals("Bye World", out);
     }
 
@@ -35,7 +35,7 @@ public class NettyProxyMixedCasePathTest extends BaseNettyTest {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("netty-http:http://0.0.0.0:{{port}}/Shopping").to("netty-http:http://0.0.0.0:{{port}}/ws/svc/Shopping");
+                from("netty-http:http://0.0.0.0:{{port}}/Shopping").to("netty-http:http://localhost:{{port}}/ws/svc/Shopping");
 
                 from("netty-http:http://0.0.0.0:{{port}}/ws/svc/Shopping").transform(body().prepend("Bye "));
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/30b29843/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRecipientListHttpBaseTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRecipientListHttpBaseTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRecipientListHttpBaseTest.java
index be8bedb..0960bbb 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRecipientListHttpBaseTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRecipientListHttpBaseTest.java
@@ -45,7 +45,7 @@ public class NettyRecipientListHttpBaseTest extends BaseNettyTest {
                     .transform(body().prepend("Bye "));
 
                 from("direct:start")
-                    .recipientList().constant("netty-http:http://0.0.0.0:{{port}}");
+                    .recipientList().constant("netty-http:http://localhost:{{port}}");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/30b29843/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRouteSimpleTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRouteSimpleTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRouteSimpleTest.java
index ae5e1ee..2dadf37 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRouteSimpleTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyRouteSimpleTest.java
@@ -41,7 +41,7 @@ public class NettyRouteSimpleTest extends BaseNettyTest {
             public void configure() throws Exception {
                 from("netty-http:http://0.0.0.0:{{port}}/foo")
                     .to("mock:input1")
-                    .to("netty-http:http://0.0.0.0:" + port2 + "/bar");
+                    .to("netty-http:http://localhost:" + port2 + "/bar");
                 from("netty-http:http://0.0.0.0:" + port2 + "/bar")
                     .to("mock:input2")
                     .transform().constant("Bye World");