CAMEL-6555 Fixed the test errors of SharedWorkerThreadPool
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5022509b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5022509b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5022509b Branch: refs/heads/master Commit: 5022509b450e5ec1fd9b9a88dc4cb9fbd8731402 Parents: c761731 Author: Willem Jiang <willem.ji...@gmail.com> Authored: Tue Jul 22 21:18:01 2014 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Tue Jul 22 21:25:20 2014 +0800 ---------------------------------------------------------------------- .../netty4/NettyServerBootstrapConfiguration.java | 4 ++-- .../NettyUseSharedWorkerThreadPoolManyRoutesTest.java | 2 +- .../netty4/NettyUseSharedWorkerThreadPoolTest.java | 12 ++++++------ .../SpringNettyUseSharedWorkerThreadPoolTest.java | 2 +- .../netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/5022509b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java index a60b45f..bf55073 100644 --- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java @@ -308,7 +308,7 @@ public class NettyServerBootstrapConfiguration implements Cloneable { return bossGroup; } - public void setBossPool(EventLoopGroup bossGroup) { + public void setBossGroup(EventLoopGroup bossGroup) { this.bossGroup = bossGroup; } @@ -316,7 +316,7 @@ public class NettyServerBootstrapConfiguration implements Cloneable { return workerGroup; } - public void setWorkerPool(EventLoopGroup workerGroup) { + public void setWorkerGroup(EventLoopGroup workerGroup) { this.workerGroup = workerGroup; } http://git-wip-us.apache.org/repos/asf/camel/blob/5022509b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java index c40fb80..fa71b39 100644 --- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java +++ b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java @@ -71,7 +71,7 @@ public class NettyUseSharedWorkerThreadPoolManyRoutesTest extends BaseNettyTest for (int i = 0; i < 100; i++) { from("netty4:tcp://localhost:" + getNextPort() + "?textline=true&sync=true&orderedThreadPoolExecutor=false" - + "&bossPool=#sharedBoss&workerPool=#sharedWorker") + + "&bossGroup=#sharedBoss&workerGroup=#sharedWorker") .validate(body().isInstanceOf(String.class)) .to("log:result") .to("mock:result") http://git-wip-us.apache.org/repos/asf/camel/blob/5022509b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java index ccf6fed..31a5be9 100644 --- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java +++ b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java @@ -49,13 +49,13 @@ public class NettyUseSharedWorkerThreadPoolTest extends BaseNettyTest { getMockEndpoint("mock:result").expectedMessageCount(30); for (int i = 0; i < 10; i++) { - String reply = template.requestBody("netty4:tcp://localhost:" + port + "?textline=true&sync=true&workerPool=#sharedClientPool", "Hello World", String.class); + String reply = template.requestBody("netty4:tcp://localhost:" + port + "?textline=true&sync=true&workerGroup=#sharedClientPool", "Hello World", String.class); assertEquals("Bye World", reply); - reply = template.requestBody("netty4:tcp://localhost:" + port2 + "?textline=true&sync=true&workerPool=#sharedClientPool", "Hello Camel", String.class); + reply = template.requestBody("netty4:tcp://localhost:" + port2 + "?textline=true&sync=true&workerGroup=#sharedClientPool", "Hello Camel", String.class); assertEquals("Hi Camel", reply); - reply = template.requestBody("netty4:tcp://localhost:" + port3 + "?textline=true&sync=true&workerPool=#sharedClientPool", "Hello Claus", String.class); + reply = template.requestBody("netty4:tcp://localhost:" + port3 + "?textline=true&sync=true&workerGroup=#sharedClientPool", "Hello Claus", String.class); assertEquals("Hej Claus", reply); } @@ -80,19 +80,19 @@ public class NettyUseSharedWorkerThreadPoolTest extends BaseNettyTest { port2 = getNextPort(); port3 = getNextPort(); - from("netty4:tcp://localhost:" + port + "?textline=true&sync=true&workerPool=#sharedServerPool&orderedThreadPoolExecutor=false") + from("netty4:tcp://localhost:" + port + "?textline=true&sync=true&workerGroup=#sharedServerPool&orderedThreadPoolExecutor=false") .validate(body().isInstanceOf(String.class)) .to("log:result") .to("mock:result") .transform(body().regexReplaceAll("Hello", "Bye")); - from("netty4:tcp://localhost:" + port2 + "?textline=true&sync=true&workerPool=#sharedServerPool&orderedThreadPoolExecutor=false") + from("netty4:tcp://localhost:" + port2 + "?textline=true&sync=true&workerGroup=#sharedServerPool&orderedThreadPoolExecutor=false") .validate(body().isInstanceOf(String.class)) .to("log:result") .to("mock:result") .transform(body().regexReplaceAll("Hello", "Hi")); - from("netty4:tcp://localhost:" + port3 + "?textline=true&sync=true&workerPool=#sharedServerPool&orderedThreadPoolExecutor=false") + from("netty4:tcp://localhost:" + port3 + "?textline=true&sync=true&workerGroup=#sharedServerPool&orderedThreadPoolExecutor=false") .validate(body().isInstanceOf(String.class)) .to("log:result") .to("mock:result") http://git-wip-us.apache.org/repos/asf/camel/blob/5022509b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java index 2a4254a..bcedb10 100644 --- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java +++ b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java @@ -46,6 +46,6 @@ public class SpringNettyUseSharedWorkerThreadPoolTest extends CamelSpringTestSup @Override protected AbstractApplicationContext createApplicationContext() { - return new ClassPathXmlApplicationContext("org/apache/camel/component/netty/SpringNettyUseSharedWorkerThreadPoolTest.xml"); + return new ClassPathXmlApplicationContext("org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml"); } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/5022509b/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml b/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml index 8393265..ba79b34 100644 --- a/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml +++ b/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml @@ -43,7 +43,7 @@ </route> <route> - <from uri="netty:tcp://localhost:5023?textline=true&sync=true&workerPool=#sharedPool&orderedThreadPoolExecutor=false"/> + <from uri="netty4:tcp://localhost:5023?textline=true&sync=true&workerGroup=#sharedPool&orderedThreadPoolExecutor=false"/> <to uri="log:result"/> <to uri="mock:result"/> </route>