mirror of https://github.com/apache/activemq.git
added stomp temp destinations test
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@812512 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f6199fe136
commit
876ddef594
|
@ -1031,6 +1031,24 @@ public class StompTest extends CombinationTestSupport {
|
||||||
stompConnection.disconnect();
|
stompConnection.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testTempDestination() throws Exception {
|
||||||
|
|
||||||
|
String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
|
||||||
|
stompConnection.sendFrame(frame);
|
||||||
|
|
||||||
|
frame = stompConnection.receiveFrame();
|
||||||
|
assertTrue(frame.startsWith("CONNECTED"));
|
||||||
|
|
||||||
|
frame = "SUBSCRIBE\n" + "destination:/temp-queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
|
||||||
|
stompConnection.sendFrame(frame);
|
||||||
|
|
||||||
|
frame = "SEND\n" + "destination:/temp-queue/" + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;
|
||||||
|
stompConnection.sendFrame(frame);
|
||||||
|
|
||||||
|
StompFrame message = stompConnection.receive(1000);
|
||||||
|
assertEquals("Hello World", message.getBody());
|
||||||
|
}
|
||||||
|
|
||||||
protected void assertClients(int expected) throws Exception {
|
protected void assertClients(int expected) throws Exception {
|
||||||
org.apache.activemq.broker.Connection[] clients = broker.getBroker().getClients();
|
org.apache.activemq.broker.Connection[] clients = broker.getBroker().getClients();
|
||||||
int actual = clients.length;
|
int actual = clients.length;
|
||||||
|
|
Loading…
Reference in New Issue