activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r906270 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Date Wed, 03 Feb 2010 22:41:06 GMT
Author: tabish
Date: Wed Feb  3 22:41:06 2010
New Revision: 906270

URL: http://svn.apache.org/viewvc?rev=906270&view=rev
Log:
Update the Receipts test with a delay to prevent occasional failures.

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java?rev=906270&r1=906269&r2=906270&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Wed Feb  3 22:41:06 2010
@@ -304,8 +304,10 @@
         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 @@
         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 {



Mime
View raw message