You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2015/04/14 23:33:15 UTC

activemq git commit: add a test that sends multiple messages at a Queue.

Repository: activemq
Updated Branches:
  refs/heads/master cb370d06e -> a5a52b651


add a test that sends multiple messages at a Queue.

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/a5a52b65
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/a5a52b65
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/a5a52b65

Branch: refs/heads/master
Commit: a5a52b65174dfb12dc06ed0fc70ce3c25f25b0f6
Parents: cb370d0
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Apr 14 17:22:14 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Apr 14 17:22:14 2015 -0400

----------------------------------------------------------------------
 .../transport/amqp/interop/AmqpSenderTest.java  | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a5a52b65/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpSenderTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpSenderTest.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpSenderTest.java
index b060a07..d8f4c85 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpSenderTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpSenderTest.java
@@ -96,6 +96,30 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
     }
 
     @Test(timeout = 60000)
+    public void testSendMultipleMessagesToQueue() throws Exception {
+        final int MSG_COUNT = 100;
+
+        AmqpClient client = createAmqpClient();
+        AmqpConnection connection = client.connect();
+        AmqpSession session = connection.createSession();
+
+        AmqpSender sender = session.createSender("queue://" + getTestName());
+
+        for (int i = 0; i < MSG_COUNT; ++i) {
+            AmqpMessage message = new AmqpMessage();
+            message.setText("Test-Message: " + i);
+            sender.send(message);
+        }
+
+        QueueViewMBean queue = getProxyToQueue(getTestName());
+
+        assertEquals(MSG_COUNT, queue.getQueueSize());
+
+        sender.close();
+        connection.close();
+    }
+
+    @Test(timeout = 60000)
     public void testUnsettledSender() throws Exception {
         final int MSG_COUNT = 1000;