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
This commit is contained in:
Timothy A. Bish 2013-01-04 16:11:54 +00:00
parent e5d616da50
commit cbee1cc147
1 changed files with 8 additions and 6 deletions

View File

@ -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);