[jboss-cvs] JBoss Messaging SVN: r1384 - branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 28 19:53:15 EDT 2006


Author: ovidiu.feodorov at jboss.com
Date: 2006-09-28 19:53:14 -0400 (Thu, 28 Sep 2006)
New Revision: 1384

Modified:
   branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java
Log:
extra test used while investigating http://jira.jboss.org/jira/browse/JBMESSAGING-564

Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java	2006-09-28 21:57:25 UTC (rev 1383)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java	2006-09-28 23:53:14 UTC (rev 1384)
@@ -38,6 +38,7 @@
 import javax.jms.InvalidDestinationException;
 import javax.jms.JMSException;
 import javax.jms.InvalidSelectorException;
+import javax.jms.TopicSubscriber;
 import java.util.Set;
 
 
@@ -466,7 +467,32 @@
          // OK
       }
    }
-   
+
+   /**
+    * See http://jira.jboss.org/jira/browse/JBMESSAGING-564
+    */
+   public void testUnsubscribe() throws Exception
+   {
+      ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
+      Topic topic = (Topic)ic.lookup("/topic/Topic");
+
+      Connection conn = cf.createConnection();
+      conn.setClientID("zeke");
+
+      Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+      TopicSubscriber dursub = s.createDurableSubscriber(topic, "dursub0");
+
+      s.unsubscribe("dursub0");
+
+      // TODO - what happens with dursub? It is not closed, but its associated subscriber does
+      //        not exist anymore.
+
+      dursub.close();
+
+      conn.close();
+   }
+
    // Package protected ---------------------------------------------
 
    // Protected -----------------------------------------------------




More information about the jboss-cvs-commits mailing list