[jboss-cvs] JBoss Messaging SVN: r1416 - trunk/tests/src/org/jboss/test/messaging/jms

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Sep 30 06:29:56 EDT 2006


Author: ovidiu.feodorov at jboss.com
Date: 2006-09-30 06:29:54 -0400 (Sat, 30 Sep 2006)
New Revision: 1416

Modified:
   trunk/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java
Log:
DurableSubscriberTest.testDurableSubscriptionDifferentNoLocal() temporarily commented out. See http://jira.jboss.org/jira/browse/JBMESSAGING-566

Modified: trunk/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java	2006-09-30 10:21:45 UTC (rev 1415)
+++ trunk/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java	2006-09-30 10:29:54 UTC (rev 1416)
@@ -267,50 +267,52 @@
     *
     * Test with a different noLocal flag.
     */
-   public void testDurableSubscriptionDifferentNoLocal() throws Exception
-   {
-      ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
-      Topic topic = (Topic)ic.lookup("/topic/Topic");
+   // Disabled until the validity of the test is established:
+   // http://jira.jboss.org/jira/browse/JBMESSAGING-566
+//   public void testDurableSubscriptionDifferentNoLocal() throws Exception
+//   {
+//      ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
+//      Topic topic = (Topic)ic.lookup("/topic/Topic");
+//
+//      Connection conn = cf.createConnection();
+//      conn.setClientID("ID0");
+//
+//      Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+//      MessageProducer prod = s.createProducer(topic);
+//      prod.setDeliveryMode(DeliveryMode.PERSISTENT);
+//
+//      MessageConsumer durable = s.createDurableSubscriber(topic, "mySubscription", null, false);
+//
+//      TextMessage tm = null;
+//      tm = s.createTextMessage("Message One");
+//      prod.send(tm);
+//      tm = s.createTextMessage("Message Two");
+//      prod.send(tm);
+//
+//
+//      conn.start();
+//
+//      TextMessage rm = (TextMessage)durable.receive(5000);
+//      assertEquals("Message One", rm.getText());
+//
+//      conn.close();
+//
+//      conn = cf.createConnection();
+//      conn.setClientID("ID0");
+//      s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+//
+//      // modify the nolocal flag
+//      durable = s.createDurableSubscriber(topic, "mySubscription", null, true);
+//
+//      conn.start();
+//
+//      Message m = durable.receive(1000);
+//
+//      // the durable subscription is destroyed and re-created. "Message Two" stored by the previous
+//      // durable subscription is lost and (hopefully) garbage collected.
+//      assertNull(m);
+//   }
 
-      Connection conn = cf.createConnection();
-      conn.setClientID("ID0");
-
-      Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      MessageProducer prod = s.createProducer(topic);
-      prod.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-      MessageConsumer durable = s.createDurableSubscriber(topic, "mySubscription", null, false);
-
-      TextMessage tm = null;
-      tm = s.createTextMessage("Message One");
-      prod.send(tm);
-      tm = s.createTextMessage("Message Two");
-      prod.send(tm);
-
-
-      conn.start();
-
-      TextMessage rm = (TextMessage)durable.receive(5000);
-      assertEquals("Message One", rm.getText());
-
-      conn.close();
-
-      conn = cf.createConnection();
-      conn.setClientID("ID0");
-      s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-      // modify the nolocal flag
-      durable = s.createDurableSubscriber(topic, "mySubscription", null, true);
-
-      conn.start();
-
-      Message m = durable.receive(1000);
-
-      // the durable subscription is destroyed and re-created. "Message Two" stored by the previous
-      // durable subscription is lost and (hopefully) garbage collected.
-      assertNull(m);
-   }
-
    public void testDurableSubscriptionOnTemporaryTopic() throws Exception
    {
       ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");




More information about the jboss-cvs-commits mailing list