Fix the test so that there's time for the Ack to be processed before the connection is closed otherwise it can be missed.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1232457 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-01-17 16:14:16 +00:00
parent 221da8bcd2
commit 5774d004f8
1 changed files with 9 additions and 4 deletions

View File

@ -753,6 +753,11 @@ public class StompTest extends CombinationTestSupport {
StompFrame ack = new StompFrame("ACK", ackHeaders); StompFrame ack = new StompFrame("ACK", ackHeaders);
stompConnection.sendFrame(ack.format()); stompConnection.sendFrame(ack.format());
// Need some time for the Ack to get processed.
waitForFrameToTakeEffect();
frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
stompConnection.sendFrame(frame);
stompDisconnect(); stompDisconnect();
@ -1729,7 +1734,7 @@ public class StompTest extends CombinationTestSupport {
} }
public void testReplytoModification() throws Exception { public void testReplytoModification() throws Exception {
String replyto = "some destination"; String replyto = "some destination";
String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL; String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
stompConnection.sendFrame(frame); stompConnection.sendFrame(frame);