From 1c8cfd9cfe7caa151e3f88a36e0f9bd8f411c350 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Tue, 4 Mar 2008 17:28:53 +0000 Subject: [PATCH] The testWildcardConsume has 1 consumer subscribe to 2 destiantions and made an assumption that messages would delivered in the order published to the 2 different destinations. This is not correct as the messages could queue up and get dispatched at different times. Updated the code so that this assumption is no longer relied on. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@633554 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/broker/BrokerTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java index db876c8de2..9a0aec3086 100755 --- a/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java @@ -839,14 +839,15 @@ public class BrokerTest extends BrokerTestSupport { // These two message should match the wild card. ActiveMQDestination d1 = ActiveMQDestination.createDestination("WILD.CARD.TEST", destinationType); connection1.send(createMessage(producerInfo1, d1, deliveryMode)); - ActiveMQDestination d2 = ActiveMQDestination.createDestination("WILD.FOO.TEST", destinationType); - connection1.request(createMessage(producerInfo1, d2, deliveryMode)); - + Message m = receiveMessage(connection1); assertNotNull(m); - //assertEquals(d1, m.getDestination()); + assertEquals(d1, m.getDestination()); + + ActiveMQDestination d2 = ActiveMQDestination.createDestination("WILD.FOO.TEST", destinationType); + connection1.request(createMessage(producerInfo1, d2, deliveryMode)); m = receiveMessage(connection1); - //assertNotNull(m); + assertNotNull(m); assertEquals(d2, m.getDestination()); assertNoMessagesLeft(connection1);