activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1428462 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java
Date Thu, 03 Jan 2013 16:39:55 GMT
Author: tabish
Date: Thu Jan  3 16:39:54 2013
New Revision: 1428462

URL: http://svn.apache.org/viewvc?rev=1428462&view=rev
Log:
fix test case after changes in https://issues.apache.org/jira/browse/AMQ-4237 broke the test's
MBean lookup

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java?rev=1428462&r1=1428461&r2=1428462&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java
Thu Jan  3 16:39:54 2013
@@ -17,10 +17,13 @@
 
 package org.apache.activemq.usecases;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.net.URI;
-import javax.jms.Connection;
+
 import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
@@ -99,7 +102,7 @@ public class ConsumeUncompressedCompress
     @Test
     public void testBrowseAndReceiveCompressedMessages() throws Exception {
 
-        assertTrue(((ActiveMQConnection) connection).isUseCompression());
+        assertTrue(connection.isUseCompression());
 
         createProducerAndSendMessages(1);
 
@@ -165,8 +168,8 @@ public class ConsumeUncompressedCompress
     private QueueViewMBean getProxyToQueueViewMBean()
             throws MalformedObjectNameException, JMSException {
         ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq"
-                + ":Type=Queue,Destination=" + queue.getQueueName()
-                + ",BrokerName=localhost");
+                + ":destinationType=Queue,destinationName=" + queue.getQueueName()
+                + ",type=Broker,brokerName=localhost");
         QueueViewMBean proxy = (QueueViewMBean) broker.getManagementContext()
                 .newProxyInstance(queueViewMBeanName, QueueViewMBean.class,
                         true);



Mime
View raw message