Author: tabish
Date: Thu Jul 5 14:34:18 2012
New Revision: 1357630
URL: http://svn.apache.org/viewvc?rev=1357630&view=rev
Log:
fix failing test that sometimes get an extra newline in the frame frame the
inactivity monitor.
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java?rev=1357630&r1=1357629&r2=1357630&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
Thu Jul 5 14:34:18 2012
@@ -196,14 +196,15 @@ public class Stomp11Test extends Combina
"\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());