You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ha...@apache.org on 2014/03/20 18:44:40 UTC
[29/29] git commit: Merge missing function from previous commit
Merge missing function from previous commit
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/50abbc35
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/50abbc35
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/50abbc35
Branch: refs/heads/activemq-5.9
Commit: 50abbc35b8393da37812a44f7117d969a4e510cb
Parents: 9475f0f
Author: Hadrian Zbarcea <ha...@apache.org>
Authored: Thu Mar 20 13:43:45 2014 -0400
Committer: Hadrian Zbarcea <ha...@apache.org>
Committed: Thu Mar 20 13:43:45 2014 -0400
----------------------------------------------------------------------
.../org/apache/activemq/VirtualDestTest.java | 21 ++++++++++++++++++++
1 file changed, 21 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/50abbc35/activemq-runtime-config/src/test/java/org/apache/activemq/VirtualDestTest.java
----------------------------------------------------------------------
diff --git a/activemq-runtime-config/src/test/java/org/apache/activemq/VirtualDestTest.java b/activemq-runtime-config/src/test/java/org/apache/activemq/VirtualDestTest.java
index d7732d1..563f3b5 100644
--- a/activemq-runtime-config/src/test/java/org/apache/activemq/VirtualDestTest.java
+++ b/activemq-runtime-config/src/test/java/org/apache/activemq/VirtualDestTest.java
@@ -252,4 +252,25 @@ public class VirtualDestTest extends RuntimeConfigTestSupport {
connection.close();
}
+ private void exerciseCompositeQueue(String dest, String consumerQ) throws Exception {
+ ActiveMQConnection connection = new ActiveMQConnectionFactory("vm://localhost").createActiveMQConnection();
+ connection.start();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer) session.createConsumer(session.createQueue(consumerQ));
+ LOG.info("new consumer for: " + consumer.getDestination());
+ MessageProducer producer = session.createProducer(session.createQueue(dest));
+ final String body = "To cq:" + dest;
+ producer.send(session.createTextMessage(body));
+ LOG.info("sent to: " + producer.getDestination());
+
+ Message message = null;
+ for (int i=0; i<10 && message == null; i++) {
+ message = consumer.receive(1000);
+ }
+ assertNotNull("got message", message);
+ assertEquals("got expected message", body, ((TextMessage) message).getText());
+ connection.close();
+ }
+
}