Author: clebert.suconic(a)jboss.com
Date: 2009-08-22 23:51:28 -0400 (Sat, 22 Aug 2009)
New Revision: 7898
Modified:
trunk/tests/src/org/hornetq/tests/integration/client/CompactingTest.java
Log:
Increase timeout on test to avoid eventual faliures
Modified: trunk/tests/src/org/hornetq/tests/integration/client/CompactingTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/CompactingTest.java 2009-08-23
03:21:57 UTC (rev 7897)
+++ trunk/tests/src/org/hornetq/tests/integration/client/CompactingTest.java 2009-08-23
03:51:28 UTC (rev 7898)
@@ -220,29 +220,43 @@
setupServer(journalType);
- ClientSession sess = sf.createSession(true, true);
+ ClientSession sess = null;
- ClientConsumer cons = sess.createConsumer(Q1);
+ try
+ {
+
+ sess = sf.createSession(true, true);
- sess.start();
+ ClientConsumer cons = sess.createConsumer(Q1);
- for (int i = 0; i < numberOfMessages.intValue(); i++)
- {
- ClientMessage msg = cons.receive(10000);
- assertNotNull(msg);
- msg.acknowledge();
- }
+ sess.start();
- assertNull(cons.receiveImmediate());
+ for (int i = 0; i < numberOfMessages.intValue(); i++)
+ {
+ ClientMessage msg = cons.receive(60000);
+ assertNotNull(msg);
+ msg.acknowledge();
+ }
- cons.close();
+ assertNull(cons.receiveImmediate());
- cons = sess.createConsumer(Q2);
+ cons.close();
- assertNull(cons.receive(100));
+ cons = sess.createConsumer(Q2);
- sess.close();
+ assertNull(cons.receive(100));
+ }
+ finally
+ {
+ try
+ {
+ sess.close();
+ }
+ catch (Throwable ignored)
+ {
+ }
+ }
}
@Override
@@ -302,9 +316,9 @@
sf.close();
server.stop();
-
+
server = null;
-
+
sf = null;
super.tearDown();
Show replies by date