You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/10/16 17:11:25 UTC
svn commit: r1398838 -
/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
Author: tabish
Date: Tue Oct 16 15:11:25 2012
New Revision: 1398838
URL: http://svn.apache.org/viewvc?rev=1398838&view=rev
Log:
Fix for: https://issues.apache.org/jira/browse/AMQ-4104
Add the unit test for this
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=1398838&r1=1398837&r2=1398838&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 Tue Oct 16 15:11:25 2012
@@ -127,6 +127,35 @@ public class Stomp11Test extends Combina
stompConnection.sendFrame(frame);
}
+ public void testConnectedNeverEncoded() throws Exception {
+
+ String connectFrame = "STOMP\n" +
+ "login:system\n" +
+ "passcode:manager\n" +
+ "accept-version:1.1\n" +
+ "host:localhost\n" +
+ "request-id:1\n" +
+ "\n" + Stomp.NULL;
+ stompConnection.sendFrame(connectFrame);
+
+ String f = stompConnection.receiveFrame();
+ LOG.debug("Broker sent: " + f);
+
+ assertTrue(f.startsWith("CONNECTED"));
+ assertTrue(f.indexOf("response-id:1") >= 0);
+ assertTrue(f.indexOf("version:1.1") >= 0);
+ assertTrue(f.indexOf("session:") >= 0);
+
+ int sessionHeader = f.indexOf("session:");
+ f = f.substring(sessionHeader + "session:".length());
+
+ LOG.info("session header follows: " + f);
+ assertTrue(f.startsWith("ID:"));
+
+ String frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+ }
+
public void testConnectWithVersionOptions() throws Exception {
String connectFrame = "STOMP\n" +