Author: clebert.suconic(a)jboss.com
Date: 2010-12-27 19:44:28 -0500 (Mon, 27 Dec 2010)
New Revision: 10080
Modified:
trunk/tests/src/org/hornetq/tests/integration/client/ProducerFlowControlTest.java
Log:
avoiding test hanging
Modified:
trunk/tests/src/org/hornetq/tests/integration/client/ProducerFlowControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/ProducerFlowControlTest.java 2010-12-28
00:10:31 UTC (rev 10079)
+++
trunk/tests/src/org/hornetq/tests/integration/client/ProducerFlowControlTest.java 2010-12-28
00:44:28 UTC (rev 10080)
@@ -12,16 +12,25 @@
*/
package org.hornetq.tests.integration.client;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import junit.framework.Assert;
import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.core.client.*;
+import org.hornetq.api.core.client.ClientConsumer;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.MessageHandler;
+import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.client.impl.ClientProducerCreditManagerImpl;
import org.hornetq.core.client.impl.ClientProducerCredits;
import org.hornetq.core.client.impl.ClientProducerInternal;
@@ -325,7 +334,7 @@
for (int i = 0; i < numConsumers; i++)
{
- handlers[i].latch.await();
+ assertTrue(handlers[i].latch.await(5, TimeUnit.MINUTES));
Assert.assertNull(handlers[i].exception);
}