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

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@382544 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-02 22:59:55 +00:00
parent ed5d43b04f
commit 981cef5f84
1 changed files with 29 additions and 0 deletions

View File

@ -154,7 +154,36 @@ public class StompTest extends CombinationTestSupport {
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 {