From 882c5539d1b5cdfe64b4f4c5048e7c377e331846 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Mon, 19 Dec 2011 12:54:38 +0000 Subject: [PATCH] get a recept on send to ensure message gets there git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1220724 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/transport/stomp/StompTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java index 2dc7934695..f899dbcf56 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java @@ -1798,9 +1798,15 @@ public class StompTest extends CombinationTestSupport { // Send a Message with the ReplyTo value set. HashMap properties = new HashMap(); properties.put(Stomp.Headers.Send.REPLY_TO, tempDest); + properties.put(Stomp.Headers.RECEIPT_REQUESTED, "send-1"); LOG.info(String.format("Sending request message: SEND with %s=%s", Stomp.Headers.Send.REPLY_TO, tempDest)); stompConnection.send(dest, "REQUEST", null, properties); + frame = stompConnection.receiveFrame(); + assertTrue("Receipt Frame: " + frame, frame.trim().startsWith("RECEIPT")); + assertTrue("Receipt contains correct receipt-id " + frame, frame.indexOf(Stomp.Headers.Response.RECEIPT_ID) >= 0); + + // The subscription should receive a response with the ReplyTo property set. StompFrame received = responder.receive(); assertNotNull(received);