From 3e022d82623b56dd7d069c97762dafcf608437f8 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Wed, 3 Feb 2010 22:41:06 +0000 Subject: [PATCH] Update the Receipts test with a delay to prevent occasional failures. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@906270 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/transport/stomp/StompTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 bebc4324cd..1ba669011d 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 @@ -304,8 +304,10 @@ public class StompTest extends CombinationTestSupport { assertTrue(frame.startsWith("RECEIPT")); assertTrue("Receipt contains correct receipt-id", frame.indexOf(Stomp.Headers.Response.RECEIPT_ID) >= 0); - receiver.disconnect(); + frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL; + receiver.sendFrame(frame); + waitForFrameToTakeEffect(); MessageConsumer consumer = session.createConsumer(queue); @@ -320,8 +322,8 @@ public class StompTest extends CombinationTestSupport { assertNotNull(message); assertNull("JMS Message does not contain receipt request", message.getStringProperty(Stomp.Headers.RECEIPT_REQUESTED)); - stompConnection.disconnect(); - + frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL; + stompConnection.sendFrame(frame); } public void testSubscribeWithAutoAck() throws Exception {