[hornetq-commits] JBoss hornetq SVN: r11730 - branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/stomp.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Nov 21 10:01:40 EST 2011


Author: clebert.suconic at 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
    {
 



More information about the hornetq-commits mailing list