[hornetq-commits] JBoss hornetq SVN: r8893 - trunk/tests/src/org/hornetq/tests/stress/stomp.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Feb 22 06:16:16 EST 2010


Author: jmesnil
Date: 2010-02-22 06:16:15 -0500 (Mon, 22 Feb 2010)
New Revision: 8893

Modified:
   trunk/tests/src/org/hornetq/tests/stress/stomp/StompStressTest.java
Log:
https://jira.jboss.org/jira/browse/HORNETQ-129: Implement STOMP v1.0

* stress test for Stomp protocol

Modified: trunk/tests/src/org/hornetq/tests/stress/stomp/StompStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/stomp/StompStressTest.java	2010-02-22 10:16:42 UTC (rev 8892)
+++ trunk/tests/src/org/hornetq/tests/stress/stomp/StompStressTest.java	2010-02-22 11:16:15 UTC (rev 8893)
@@ -40,7 +40,7 @@
 {
    private static final transient Logger log = Logger.getLogger(StompStressTest.class);
 
-   private static final int COUNT = 100;
+   private static final int COUNT = 1000;
 
    private int port = 61613;
 
@@ -60,22 +60,24 @@
       frame = receiveFrame(10000);
       Assert.assertTrue(frame.startsWith("CONNECTED"));
 
-      frame = "SEND\n" + "destination:" + destination + "\n\n";
+      frame = "SUBSCRIBE\n" + "destination:" + destination + "\n" + "ack:auto\n\n" + Stomp.NULL;
+      sendFrame(frame);
 
+      frame = "SEND\n" + "destination:" + destination + "\n";
+
       for (int i = 0; i < COUNT; i++)
       {
-         sendFrame(frame + "count=" + i + Stomp.NULL);
+         System.out.println(">>> " + i);
+         sendFrame(frame + "count:" + i + "\n\n" + Stomp.NULL);
       }
 
-      frame = "SUBSCRIBE\n" + "destination:" + destination + "\n" + "ack:auto\n\n" + Stomp.NULL;
-      sendFrame(frame);
-
       for (int i = 0; i < COUNT; i++)
       {
+         System.out.println("<<< " + i);
          frame = receiveFrame(10000);
          Assert.assertTrue(frame.startsWith("MESSAGE"));
          Assert.assertTrue(frame.indexOf("destination:") > 0);
-         Assert.assertTrue(frame.indexOf("count=" + i) > 0);
+         Assert.assertTrue(frame.indexOf("count:" + i) > 0);
       }
 
       frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;



More information about the hornetq-commits mailing list