fix failing test that sometimes get an extra newline in the frame frame the inactivity monitor.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1357630 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-07-05 14:34:18 +00:00
parent 12585eb5be
commit a2f59ec0ad
1 changed files with 4 additions and 3 deletions

View File

@ -196,14 +196,15 @@ public class Stomp11Test extends CombinationTestSupport {
"\n" + Stomp.NULL;
stompConnection.sendFrame(connectFrame);
String f = stompConnection.receiveFrame();
String f = stompConnection.receiveFrame().trim();
LOG.info("Broker sent: " + f);
assertTrue("Failed to receive a connected frame.", f.startsWith("CONNECTED"));
assertTrue("Frame should have a versoion 1.1 header.", f.indexOf("version:1.1") >= 0);
assertTrue("Frame should have a heart beat header.", f.indexOf("heart-beat:") >= 0);
assertTrue("Frame should have a session header.", f.indexOf("session:") >= 0);
LOG.info("Broker sent: " + f);
stompConnection.getStompSocket().getOutputStream().write('\n');
DataInputStream in = new DataInputStream(stompConnection.getStompSocket().getInputStream());