You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2020/05/14 10:35:40 UTC

[tomee] branch master updated: Adding a test for the management context

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9bbf933  Adding a test for the management context
9bbf933 is described below

commit 9bbf933af35c55c103c6eaa58cad07c50fad2016
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Thu May 14 11:35:03 2020 +0100

    Adding a test for the management context
---
 .../openejb/resource/activemq/ActiveMQ5FactoryTest.java  | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQ5FactoryTest.java b/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQ5FactoryTest.java
index 109dc35..8912088 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQ5FactoryTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQ5FactoryTest.java
@@ -71,4 +71,20 @@ public class ActiveMQ5FactoryTest {
             assertEquals("duplex is " + b, b, nc.isDuplex());
         }
     }
+
+    @Test
+    public void checkManagementContext() throws Exception {
+        final URI brokerURI = new URI("amq5factory:broker:(tcp://localhost:" + getNextAvailablePort() + ")?" +
+                "useJmx=true");
+
+        BrokerService bs = null;
+        try {
+            bs = new ActiveMQ5Factory().createBroker(brokerURI);
+            assertFalse(bs.getManagementContext().isCreateConnector());
+        } finally {
+            if (bs != null) {
+                bs.stop();
+            }
+        }
+    }
 }