activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r382544 - /incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Date Thu, 02 Mar 2006 22:59:57 GMT
Author: chirino
Date: Thu Mar  2 14:59:55 2006
New Revision: 382544

URL: http://svn.apache.org/viewcvs?rev=382544&view=rev
Log:
Added test case to verify that the group id could be set using STOMP, in reference to:
http://forums.activemq.org/posts/list/442.page

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

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java?rev=382544&r1=382543&r2=382544&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Thu Mar  2 14:59:55 2006
@@ -154,7 +154,36 @@
         assertNotNull(message);
         assertEquals("Hello World", message.getText());
     }
+
     
+    public void testJMSXGroupIdCanBeSet() throws Exception {
+        
+        MessageConsumer consumer = session.createConsumer(queue);
+        
+        String frame = 
+            "CONNECT\n" + 
+            "login: brianm\n" + 
+            "passcode: wombats\n\n"+
+            Stomp.NULL;
+        sendFrame(frame);
+        
+        frame = receiveFrame(10000);
+        assertTrue(frame.startsWith("CONNECTED"));
+        
+        frame =
+            "SEND\n" +
+            "destination:/queue/" + getQueueName() + "\n" +
+            "JMSXGroupID: TEST\n\n" +
+            "Hello World" +
+            Stomp.NULL;
+        
+        sendFrame(frame);
+        
+        TextMessage message = (TextMessage) consumer.receive(1000);
+        assertNotNull(message);
+        assertEquals("TEST", ((ActiveMQTextMessage)message).getGroupID());
+    }
+
     
     public void testSendMessageWithCustomHeadersAndSelector() throws Exception {
         



Mime
View raw message