From 6a253ebd3f422235a1aa9e504267785e41570301 Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Fri, 2 Nov 2012 14:42:30 +0000 Subject: [PATCH] amqp - JMSClientTest with browser git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1404980 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/transport/amqp/JMSClientTest.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java index 44ec742c3c..7650e4fc3d 100644 --- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java +++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java @@ -23,6 +23,8 @@ import org.junit.Test; import javax.jms.*; +import java.util.Enumeration; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -44,11 +46,20 @@ public class JMSClientTest extends AmqpTestSupport { msg.setObjectProperty("x", 1); p.send(msg); // session.commit(); - MessageConsumer c = session.createConsumer(queue, "x = 1"); +/* MessageConsumer c = session.createConsumer(queue, "x = 1"); Message received = c.receive(2000); assertNotNull(received); System.out.println("first: " + ((TextMessage)received).getText()); - System.out.println(received.getJMSRedelivered()); + System.out.println(received.getJMSRedelivered());*/ + + + QueueBrowser browser = session.createBrowser(queue); + Enumeration enumeration = browser.getEnumeration(); + while (enumeration.hasMoreElements()) { + + System.out.println("BROWSE " + enumeration.nextElement()); + } + // session.rollback(); //