[jboss-cvs] JBoss Messaging SVN: r1662 - branches/Branch_1_0_1_SP/tests/src/org/jboss/test/messaging/jms/stress

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 30 03:15:31 EST 2006


Author: ovidiu.feodorov at jboss.com
Date: 2006-11-30 03:15:30 -0500 (Thu, 30 Nov 2006)
New Revision: 1662

Modified:
   branches/Branch_1_0_1_SP/tests/src/org/jboss/test/messaging/jms/stress/ConcurrentCloseStressTest.java
Log:
make the stress test to report some sort of progress

Modified: branches/Branch_1_0_1_SP/tests/src/org/jboss/test/messaging/jms/stress/ConcurrentCloseStressTest.java
===================================================================
--- branches/Branch_1_0_1_SP/tests/src/org/jboss/test/messaging/jms/stress/ConcurrentCloseStressTest.java	2006-11-30 08:01:35 UTC (rev 1661)
+++ branches/Branch_1_0_1_SP/tests/src/org/jboss/test/messaging/jms/stress/ConcurrentCloseStressTest.java	2006-11-30 08:15:30 UTC (rev 1662)
@@ -200,6 +200,11 @@
                   session = conn.createSession(true, Session.SESSION_TRANSACTED);
                   consumer = session.createConsumer((Destination)queue);
                }
+
+               if (messageCounter % 50 == 0) 
+               {
+                  log.info("Reader " + index + " read " + messageCounter + " messages");
+               }
             }
 
             session.commit();
@@ -223,8 +228,8 @@
       private static final Logger log = Logger.getLogger(ProducerThread.class);
 
       Connection conn;
-
       Queue queue;
+      private int messageCount;
 
       public ProducerThread(int index, Connection conn, Queue queue) throws Exception
       {
@@ -245,8 +250,9 @@
 
                for (int j = 0; j < 20; j++)
                {
+                  messageCount ++;
                   producer.send(sess.createTextMessage("Message " + i + ", " + j));
-                  log.debug("Message " + j + " on i=" + i + " sent");
+
                   if (j % 2 == 0)
                   {
                      log.debug("commit");
@@ -263,6 +269,11 @@
                sess.commit();
                sess.close();
 
+               if (messageCount % 50 == 0)
+               {
+                  log.info("Producer " + index + " sent " + messageCount + " messages");
+               }
+
             }
             catch (Exception e)
             {




More information about the jboss-cvs-commits mailing list