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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 7 10:58:58 EDT 2006


Author: clebert.suconic at jboss.com
Date: 2006-09-07 10:58:57 -0400 (Thu, 07 Sep 2006)
New Revision: 1267

Modified:
   branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/crash/DurableCrash1.java
   branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/crash/DurableCrash2.java
Log:
small changes on the test

Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/crash/DurableCrash1.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/crash/DurableCrash1.java	2006-09-06 22:53:22 UTC (rev 1266)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/crash/DurableCrash1.java	2006-09-07 14:58:57 UTC (rev 1267)
@@ -90,7 +90,7 @@
 	      MessageConsumer durable = s.createDurableSubscriber(topic, "subs1");
 	      MessageConsumer durable2 = s2.createDurableSubscriber(topic, "subs2");
 
-	      conn2.close(); // If I close conn2 durable2 is able to receive its message.
+	      //conn2.close(); -- do not remote this comment. It was meant to not close the connection
 	      
 	      
 	      for (int i=0;i<10;i++)
@@ -103,7 +103,7 @@
 	      conn = cf.createConnection();
 	      conn.setClientID("client1");
 	      conn.start();
-	      s = conn.createSession(true, Session.CLIENT_ACKNOWLEDGE);
+	      s = conn.createSession(true, Session.AUTO_ACKNOWLEDGE);
 	      durable = s.createDurableSubscriber(topic, "subs1");
 
 	      for (int i=0;i<2;i++)
@@ -114,6 +114,8 @@
 	    	  System.out.println(tm.getText());
 	    	  assertEquals("k" + i, tm.getText());
 	      }
+	      
+	      //conn.close();-- do not remote this comment. It was meant to not close the connection
 
 	      //System.exit(0); -- this is not needed as there is not tearDown, the client VM will simply be finished the same way an exit would do, and this is better since it will keep proper JUNIT report outputs
 	   }

Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/crash/DurableCrash2.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/crash/DurableCrash2.java	2006-09-06 22:53:22 UTC (rev 1266)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/crash/DurableCrash2.java	2006-09-07 14:58:57 UTC (rev 1267)
@@ -62,6 +62,7 @@
 
 	   public void testSimplestDurableSubscription() throws Exception
 	   {
+		  
 	      ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
 	      Topic topic = (Topic)ic.lookup("/topic/TopicCrash");
 	      
@@ -72,7 +73,7 @@
 	      Connection conn2 = cf.createConnection();
 	      conn2.setClientID("client2");
 	      conn2.start();
-	      Session s2 = conn2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+	      Session s2 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
 	      MessageConsumer durable2 = s2.createDurableSubscriber(topic, "subs2");
 
@@ -85,11 +86,10 @@
 	    	  assertEquals("k" + i, tm.getText());
 	      }
 		  
-	      conn.close();
 	      conn = cf.createConnection();
 	      conn.setClientID("client1");
 	      conn.start();
-	      s = conn.createSession(true, Session.CLIENT_ACKNOWLEDGE);
+	      s = conn.createSession(true, Session.AUTO_ACKNOWLEDGE);
 	      durable = s.createDurableSubscriber(topic, "subs1");
 
 	      for (int i=2;i<10;i++)




More information about the jboss-cvs-commits mailing list