[jboss-cvs] JBoss Messaging SVN: r7987 - branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 29 22:34:26 EDT 2010


Author: gaohoward
Date: 2010-03-29 22:34:25 -0400 (Mon, 29 Mar 2010)
New Revision: 7987

Modified:
   branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/DistributedTopicTest.java
Log:
refactor a method clusteredTopicSharedDurableNoLocalSub to add more logs 


Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/DistributedTopicTest.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/DistributedTopicTest.java	2010-03-29 06:45:40 UTC (rev 7986)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/DistributedTopicTest.java	2010-03-30 02:34:25 UTC (rev 7987)
@@ -1309,7 +1309,7 @@
 
 
          int offset = 0;
-
+         String checkResult = "no error";
          for (int i = 0; i < NUM_MESSAGES / 2; i++)
          {
             TextMessage tm = (TextMessage)cons1.receive(3000);
@@ -1320,8 +1320,15 @@
             	offset = 1;
             }
 
-            assertEquals("message2-" + (i * 2 + offset), tm.getText());
+            log.info("Message " + i + "th received: " + tm.getText() + " offset: " + offset);
+            
+            if (("message2-" + (i * 2 + offset)).equals(tm.getText()))
+            {
+               checkResult = "Message received not expected, should be: " + "message2-" + (i * 2 + offset) + " but was " + tm.getText();
+               log.error(checkResult);
+            }
          }
+         assertEquals("no error", checkResult);
 
          Message msg = cons1.receive(3000);
          assertNull(msg);




More information about the jboss-cvs-commits mailing list