You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2014/10/28 22:15:28 UTC

[2/2] git commit: Add a little bit more validation to the durable subscribe test.

Add a little bit more validation to the durable subscribe test.

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/a0c76f6a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/a0c76f6a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/a0c76f6a

Branch: refs/heads/master
Commit: a0c76f6ad573cf4c04d3c268c78c3289d1061acf
Parents: 7b601d2
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Oct 28 16:12:37 2014 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Oct 28 17:14:06 2014 -0400

----------------------------------------------------------------------
 .../apache/qpid/jms/consumer/JmsDurableSubscriberTest.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a0c76f6a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/consumer/JmsDurableSubscriberTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/consumer/JmsDurableSubscriberTest.java b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/consumer/JmsDurableSubscriberTest.java
index d81b30b..438c618 100644
--- a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/consumer/JmsDurableSubscriberTest.java
+++ b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/consumer/JmsDurableSubscriberTest.java
@@ -61,12 +61,18 @@ public class JmsDurableSubscriberTest extends AmqpTestSupport {
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         assertNotNull(session);
         Topic topic = session.createTopic(name.getMethodName());
-        session.createDurableSubscriber(topic, name.getMethodName() + "-subscriber");
+        MessageConsumer consumer = session.createDurableSubscriber(topic, name.getMethodName() + "-subscriber");
 
         TopicViewMBean proxy = getProxyToTopic(name.getMethodName());
         assertEquals(0, proxy.getQueueSize());
 
         assertEquals(1, brokerService.getAdminView().getDurableTopicSubscribers().length);
+        assertEquals(0, brokerService.getAdminView().getInactiveDurableTopicSubscribers().length);
+
+        consumer.close();
+
+        assertEquals(0, brokerService.getAdminView().getDurableTopicSubscribers().length);
+        assertEquals(1, brokerService.getAdminView().getInactiveDurableTopicSubscribers().length);
     }
 
     @Test(timeout = 60000)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org