This is an automated email from the ASF dual-hosted git repository. pascalschumacher pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 95839049ee4b3f535b0d2b48eb1d2106784fdb10 Author: Pascal Schumacher <[email protected]> AuthorDate: Sun Nov 12 18:02:05 2017 +0100 camel-netty-http: make ManagedNettyEndpointTest succeed when other tests are run before it --- .../camel/component/netty/http/ManagedNettyEndpointTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java index aff7ed9..8e7d785 100644 --- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java +++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java @@ -56,13 +56,11 @@ public class ManagedNettyEndpointTest extends BaseNettyTest { } assertMockEndpointsSatisfied(); - MBeanServer mbeanServer = getMBeanServer(); - - ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"http://0.0.0.0:" + getPort() + "/foo\""); - mbeanServer.isRegistered(on); + Set<ObjectName> endpointQueryResult = getMBeanServer().queryNames(new ObjectName("org.apache.camel:context=camel-*,type=endpoints,name=\"http://0.0.0.0:" + getPort() + "/foo\""), null); + assertEquals(1, endpointQueryResult.size()); // should only be 2 endpoints in JMX - Set<ObjectName> set = getMBeanServer().queryNames(new ObjectName("*:context=camel-1,type=endpoints,*"), null); + Set<ObjectName> set = getMBeanServer().queryNames(new ObjectName("*:context=camel-*,type=endpoints,*"), null); assertEquals(2, set.size()); } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
