Author: clebert.suconic(a)jboss.com
Date: 2011-11-21 10:01:40 -0500 (Mon, 21 Nov 2011)
New Revision: 11730
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/stomp/StompTest.java
Log:
Stomp to throw exception on inexistent destination = HORNETQ-799
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/stomp/StompTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/stomp/StompTest.java 2011-11-21
15:00:36 UTC (rev 11729)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/stomp/StompTest.java 2011-11-21
15:01:40 UTC (rev 11730)
@@ -1061,6 +1061,29 @@
sendFrame(frame);
}
+ public void testSubscribeToInvalidTopic() throws Exception
+ {
+
+ String frame = "CONNECT\n" + "login: brianm\n" +
"passcode: wombats\n\n" + Stomp.NULL;
+ sendFrame(frame);
+
+ frame = receiveFrame(100000);
+ Assert.assertTrue(frame.startsWith("CONNECTED"));
+
+ frame = "SUBSCRIBE\n" + "destination:" +
+ getTopicPrefix() +
+ getTopicName()+"IDontExist" +
+ "\n" +
+ "receipt: 12\n" +
+ "\n\n" +
+ Stomp.NULL;
+ sendFrame(frame);
+ frame = receiveFrame(10000);
+
+ System.out.println(frame);
+ Assert.assertTrue(frame.startsWith("ERROR"));
+ }
+
public void testDurableSubscriberWithReconnection() throws Exception
{