activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1428425 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
Date Thu, 03 Jan 2013 16:05:01 GMT
Author: tabish
Date: Thu Jan  3 16:05:01 2013
New Revision: 1428425

URL: http://svn.apache.org/viewvc?rev=1428425&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/bugs/MessageExpirationReaperTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java?rev=1428425&r1=1428424&r2=1428425&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
Thu Jan  3 16:05:01 2013
@@ -18,6 +18,15 @@ package org.apache.activemq.bugs;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.QueueBrowser;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.management.ObjectName;
+
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
@@ -28,13 +37,6 @@ import org.apache.activemq.command.Activ
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.management.ObjectName;
 
 /**
  * Test to determine if expired messages are being reaped if there is
@@ -137,9 +139,9 @@ public class MessageExpirationReaperTest
         String domain = "org.apache.activemq";
         ObjectName name;
         if (destination.isQueue()) {
-            name = new ObjectName(domain + ":BrokerName=" + brokerName + ",Type=Queue,Destination="
+ destinationName);
+            name = new ObjectName(domain + ":type=Broker,brokerName=" + brokerName + ",destinationType=Queue,destinationName="
+ destinationName);
         } else {
-            name = new ObjectName(domain + ":BrokerName=" + brokerName + ",Type=Topic,Destination="
+ destinationName);
+            name = new ObjectName(domain + ":type=Broker,brokerName=" + brokerName + ",destinationType=Topic,destinationName="
+ destinationName);
         }
         return (DestinationViewMBean) broker.getManagementContext().newProxyInstance(name,
DestinationViewMBean.class,
                 true);



Mime
View raw message