This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 8c1177a  Fix management tests due to test refactoring
8c1177a is described below

commit 8c1177a1407f92b97a310f5aafd3bf4444f39535
Author: Guillaume Nodet <[email protected]>
AuthorDate: Mon Mar 15 09:47:17 2021 +0100

    Fix management tests due to test refactoring
---
 .../apache/camel/component/netty/http/ManagedNettyEndpointTest.java | 6 ++++--
 .../apache/camel/component/undertow/rest/RestManagementTest.java    | 3 ++-
 2 files changed, 6 insertions(+), 3 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 375baf7..2d49226 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
@@ -64,11 +64,13 @@ public class ManagedNettyEndpointTest extends BaseNettyTest 
{
         MBeanServer mbeanServer = getMBeanServer();
 
         ObjectName on = ObjectName
-                
.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"http://0.0.0.0:";
 + getPort() + "/foo\"");
+                .getInstance("org.apache.camel:context=" + 
context.getManagementName()
+                             + ",type=endpoints,name=\"http://0.0.0.0:"; + 
getPort() + "/foo\"");
         mbeanServer.isRegistered(on);
 
         // 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=" + 
context.getManagementName() + ",type=endpoints,*"), null);
         assertEquals(2, set.size());
     }
 
diff --git 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestManagementTest.java
 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestManagementTest.java
index 4b1588c..8cfa2fc 100644
--- 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestManagementTest.java
+++ 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestManagementTest.java
@@ -42,7 +42,8 @@ public class RestManagementTest extends BaseUndertowTest {
     public void testRestManagement() throws Exception {
         MBeanServer mbeanServer = getMBeanServer();
 
-        Set<ObjectName> s = mbeanServer.queryNames(new 
ObjectName("org.apache.camel:type=endpoints,*"), null);
+        Set<ObjectName> s = mbeanServer.queryNames(
+                new ObjectName("org.apache.camel:context=" + 
context.getManagementName() + ",type=endpoints,*"), null);
         assertEquals(8, s.size(), "Could not find 8 endpoints: " + s);
 
         // there should be 3 rest endpoints

Reply via email to