[hornetq-commits] JBoss hornetq SVN: r7919 - trunk/tests/src/org/hornetq/tests/integration/jms.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Aug 27 05:02:32 EDT 2009


Author: jmesnil
Date: 2009-08-27 05:02:32 -0400 (Thu, 27 Aug 2009)
New Revision: 7919

Modified:
   trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
Log:
added traces to find the cause of intermittent failures on hudson

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java	2009-08-26 14:21:01 UTC (rev 7918)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java	2009-08-27 09:02:32 UTC (rev 7919)
@@ -101,7 +101,7 @@
          {
             receivedMessagesAfterRestart = true;
          }
-         System.out.println(msg);
+         System.out.println(receivedMessagesAfterRestart + " " + msg);
       }
    };
 
@@ -112,6 +112,7 @@
          exceptionLatch.countDown();
          disconnect();
          connect();
+         reconnectionLatch.countDown();
       }
    };
 
@@ -139,7 +140,7 @@
       
       connect();
 
-      int num = 10;
+      int num = 20;
       for (int i = 0; i < num; i++)
       {
          try
@@ -159,14 +160,15 @@
             Thread.sleep(5000);
             restartServer();
             afterRestart = true;
-            boolean clientReconnected = reconnectionLatch.await(10, SECONDS);
-            assertTrue("client did not reconnect after server was restarted", clientReconnected);
          }
       }
 
       boolean gotException = exceptionLatch.await(10, SECONDS);
       assertTrue(gotException);
 
+      boolean clientReconnected = reconnectionLatch.await(10, SECONDS);
+      assertTrue("client did not reconnect after server was restarted", clientReconnected);
+
       assertTrue(receivedMessagesAfterRestart);
       connection.close();
       
@@ -328,10 +330,11 @@
          connection.setExceptionListener(exceptionListener);
          session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
          producer = session.createProducer(topic);
+         System.out.println("creating consumer");
          consumer = session.createConsumer(topic);
          consumer.setMessageListener(listener);
          connection.start();
-         reconnectionLatch.countDown();
+         System.out.println("started new connection");
       }
       catch (Exception e)
       {



More information about the hornetq-commits mailing list