Author: clebert.suconic(a)jboss.com
Date: 2011-12-08 15:24:48 -0500 (Thu, 08 Dec 2011)
New Revision: 11884
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java
Log:
fixing test
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java 2011-12-08
18:22:55 UTC (rev 11883)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java 2011-12-08
20:24:48 UTC (rev 11884)
@@ -1,5 +1,7 @@
package org.hornetq.tests.integration.spring;
+import java.util.concurrent.TimeUnit;
+
import junit.framework.Assert;
import org.hornetq.core.logging.Logger;
@@ -34,9 +36,12 @@
{
MessageSender sender =
(MessageSender)context.getBean("MessageSender");
System.out.println("Sending message...");
+ ExampleListener.latch.countUp();
sender.send("Hello world");
- Thread.sleep(100);
+ ExampleListener.latch.await(10, TimeUnit.SECONDS);
+ Thread.sleep(500);
Assert.assertEquals(ExampleListener.lastMessage, "Hello world");
+ System.out.println("done!");
((HornetQConnectionFactory)sender.getConnectionFactory()).close();
}
finally
Show replies by date