You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2019/04/11 19:19:48 UTC

[tomcat] branch master updated: Add check for registration of the proper objects

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

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


The following commit(s) were added to refs/heads/master by this push:
     new ccc5e92  Add check for registration of the proper objects
ccc5e92 is described below

commit ccc5e92914e5cf073533f9bca52dc48d4ecd2afe
Author: remm <re...@apache.org>
AuthorDate: Thu Apr 11 21:19:34 2019 +0200

    Add check for registration of the proper objects
---
 test/org/apache/catalina/mbeans/TestRegistration.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/org/apache/catalina/mbeans/TestRegistration.java b/test/org/apache/catalina/mbeans/TestRegistration.java
index 5204c3e..2049f81 100644
--- a/test/org/apache/catalina/mbeans/TestRegistration.java
+++ b/test/org/apache/catalina/mbeans/TestRegistration.java
@@ -214,6 +214,11 @@ public class TestRegistration extends TomcatBaseTest {
         additional.removeAll(expected);
         Assert.assertTrue("Unexpected Tomcat MBeans: " + additional, additional.isEmpty());
 
+        // Check a known attribute
+        String connectorName = Arrays.asList(connectorMBeanNames("auto-" + index, protocol)).get(0);
+        // This should normally return "http", but any non null non exception is good enough
+        Assert.assertNotNull(mbeanServer.getAttribute(new ObjectName(connectorName), "scheme"));
+
         tomcat.stop();
 
         // There should still be some Tomcat MBeans


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org