Fix Timing Problem with JmsDestinationBackedMessageTests - Wait for Listener Container Consumer Registration - needed in the topic by name test too

This commit is contained in:
Gary Russell
2010-07-27 16:30:00 +00:00
parent efff839537
commit 74422b06d1

View File

@@ -188,6 +188,9 @@ public class JmsDestinationBackedMessageChannelTests {
new JmsDestinationBackedMessageChannel(this.connectionFactory, "dynamicTopic", true);
channel.afterPropertiesSet();
channel.start();
if (!channel.waitRegisteredWithDestination(10000)) {
fail("Listener failed to subscribe to topic");
}
channel.subscribe(handler1);
channel.subscribe(handler2);
channel.send(new StringMessage("foo"));