[jboss-cvs] JBossAS SVN: r60144 - trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jan 31 12:39:07 EST 2007


Author: clebert.suconic at jboss.com
Date: 2007-01-31 12:39:07 -0500 (Wed, 31 Jan 2007)
New Revision: 60144

Modified:
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java
Log:
Fixing testcases on messaging integration testsuite

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java	2007-01-31 17:14:35 UTC (rev 60143)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java	2007-01-31 17:39:07 UTC (rev 60144)
@@ -499,6 +499,15 @@
       QueueReceiver receiver = session.createReceiver( queue );
       queueConnection.start();
 
+      //NOTE! The semantics of receiveNoWait do not guarantee the message is available
+      //immediately after the message is sent
+      //It will be available some indeterminate time later.
+      //This is fine and as per spec.
+      //To implement receiveNoWait otherwise would be very costly
+      //Also other messaging systems e.g. Sun implement it this way
+
+      Thread.sleep(1000);
+
       Message message = receiver.receiveNoWait();
       int messagecounter=0;
 
@@ -516,6 +525,9 @@
       //we got all of our messages, let's recover
       session.recover();
 
+      // See previous note on sleep
+      Thread.sleep(1000);
+
       message = receiver.receiveNoWait();
       messagecounter=0;
 




More information about the jboss-cvs-commits mailing list