activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r1425877 - in /activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp: Stomp11Test.java StompTest.java
Date Wed, 26 Dec 2012 11:00:59 GMT
Author: rajdavies
Date: Wed Dec 26 11:00:58 2012
New Revision: 1425877

URL: http://svn.apache.org/viewvc?rev=1425877&view=rev
Log:
Fix for https://issues.apache.org/jira/browse/AMQ-4237

Modified:
    activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
    activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java

Modified: activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java?rev=1425877&r1=1425876&r2=1425877&view=diff
==============================================================================
--- activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
(original)
+++ activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
Wed Dec 26 11:00:58 2012
@@ -853,7 +853,7 @@ public class Stomp11Test extends StompTe
         stompConnection.setVersion(Stomp.V1_1);
 
         String domain = "org.apache.activemq";
-        ObjectName brokerName = new ObjectName(domain + ":Type=Broker,BrokerName=localhost");
+        ObjectName brokerName = new ObjectName(domain + ":type=Broker,brokerName=localhost");
 
         BrokerViewMBean view = (BrokerViewMBean)brokerService.getManagementContext().newProxyInstance(brokerName,
BrokerViewMBean.class, true);
 
@@ -943,7 +943,7 @@ public class Stomp11Test extends StompTe
         stompConnection.setVersion(Stomp.V1_1);
 
         String domain = "org.apache.activemq";
-        ObjectName brokerName = new ObjectName(domain + ":Type=Broker,BrokerName=localhost");
+        ObjectName brokerName = new ObjectName(domain + ":type=Broker,brokerName=localhost");
 
         BrokerViewMBean view = (BrokerViewMBean)brokerService.getManagementContext().newProxyInstance(brokerName,
BrokerViewMBean.class, true);
 

Modified: activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java?rev=1425877&r1=1425876&r2=1425877&view=diff
==============================================================================
--- activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
(original)
+++ activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Wed Dec 26 11:00:58 2012
@@ -16,13 +16,6 @@
  */
 package org.apache.activemq.transport.stomp;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 import java.io.StringReader;
 import java.net.SocketTimeoutException;
 import java.util.Arrays;
@@ -33,19 +26,14 @@ import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
+import com.thoughtworks.xstream.io.xml.XppReader;
+import com.thoughtworks.xstream.io.xml.xppdom.XppFactory;
+import javax.jms.*;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
-
 import org.apache.activemq.broker.TransportConnector;
 import org.apache.activemq.broker.jmx.BrokerViewMBean;
 import org.apache.activemq.broker.jmx.QueueViewMBean;
@@ -55,12 +43,7 @@ import org.apache.activemq.util.Wait;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
-import com.thoughtworks.xstream.io.xml.XppReader;
-import com.thoughtworks.xstream.io.xml.xppdom.XppFactory;
+import static org.junit.Assert.*;
 
 public class StompTest extends StompTestSupport {
     private static final Logger LOG = LoggerFactory.getLogger(StompTest.class);
@@ -1489,7 +1472,7 @@ public class StompTest extends StompTest
         // get broker JMX view
 
         String domain = "org.apache.activemq";
-        ObjectName brokerName = new ObjectName(domain + ":Type=Broker,BrokerName=localhost");
+        ObjectName brokerName = new ObjectName(domain + ":type=Broker,brokerName=localhost");
 
         BrokerViewMBean view = (BrokerViewMBean)
                 brokerService.getManagementContext().newProxyInstance(brokerName, BrokerViewMBean.class,
true);
@@ -1543,7 +1526,7 @@ public class StompTest extends StompTest
         // get broker JMX view
 
         String domain = "org.apache.activemq";
-        ObjectName brokerName = new ObjectName(domain + ":Type=Broker,BrokerName=localhost");
+        ObjectName brokerName = new ObjectName(domain + ":type=Broker,brokerName=localhost");
 
         BrokerViewMBean view = (BrokerViewMBean)
                 brokerService.getManagementContext().newProxyInstance(brokerName, BrokerViewMBean.class,
true);
@@ -2148,16 +2131,14 @@ public class StompTest extends StompTest
 
     private BrokerViewMBean getProxyToBroker() throws MalformedObjectNameException, JMSException
{
         ObjectName brokerViewMBean = new ObjectName(
-            "org.apache.activemq:Type=Broker,BrokerName=localhost");
+            "org.apache.activemq:type=Broker,brokerName=localhost");
         BrokerViewMBean proxy = (BrokerViewMBean) brokerService.getManagementContext()
                 .newProxyInstance(brokerViewMBean, BrokerViewMBean.class, true);
         return proxy;
     }
 
     private QueueViewMBean getProxyToQueue(String name) throws MalformedObjectNameException,
JMSException {
-        ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq"
-                + ":Type=Queue,Destination=" + name
-                + ",BrokerName=localhost");
+        ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Queue,destinationName="+name);
         QueueViewMBean proxy = (QueueViewMBean) brokerService.getManagementContext()
                 .newProxyInstance(queueViewMBeanName, QueueViewMBean.class, true);
         return proxy;



Mime
View raw message