From cbee1cc14761cfe27f5a1aceff257808261efc89 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Fri, 4 Jan 2013 16:11:54 +0000 Subject: [PATCH] fix test case after changes in https://issues.apache.org/jira/browse/AMQ-4237 broke the test's MBean lookup git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1428950 13f79535-47bb-0310-9956-ffa450edef68 --- .../DurableSubscriberNonPersistentMessageTest.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriberNonPersistentMessageTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriberNonPersistentMessageTest.java index fb152395e4..74f6664dec 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriberNonPersistentMessageTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriberNonPersistentMessageTest.java @@ -138,10 +138,12 @@ public class DurableSubscriberNonPersistentMessageTest extends TestCase { createConsumer(interest, cleanupMsgCount); - String brokerVersion = (String) mbeanServer.getAttribute(new ObjectName("org.apache.activemq:BrokerName=localhost,Type=Broker"), "BrokerVersion"); + String brokerVersion = (String) mbeanServer.getAttribute(new ObjectName("org.apache.activemq:brokerName=localhost,type=Broker"), "BrokerVersion"); LOG.info("Test run on: " + brokerVersion); - final String theJmxObject = "org.apache.activemq:BrokerName=localhost,Type=Subscription,persistentMode=Durable,subscriptionID=MyDurableTopic,destinationType=Topic,destinationName=TEST,clientId=Jason"; + final String theJmxObject = "org.apache.activemq:type=Broker,brokerName=localhost," + + "endpoint=Consumer,destinationType=Topic,destinationName=TEST,clientId=Jason," + + "consumerId=Durable(Jason_MyDurableTopic)"; assertTrue("pendingQueueSize should be zero", Wait.waitFor(new Wait.Condition() { @Override @@ -275,10 +277,10 @@ public class DurableSubscriberNonPersistentMessageTest extends TestCase { public class Consumer { - private ConnectionFactory factory; - private ActiveMQConnection connection; - private Session session; - private MessageConsumer messageConsumer; + private final ConnectionFactory factory; + private final ActiveMQConnection connection; + private final Session session; + private final MessageConsumer messageConsumer; public Consumer(String brokerURL, String interest, String clientId) throws JMSException { factory = new ActiveMQConnectionFactory(brokerURL);