You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2013/02/18 16:16:40 UTC
svn commit: r1447306 -
/activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompParallelTest.scala
Author: chirino
Date: Mon Feb 18 15:16:39 2013
New Revision: 1447306
URL: http://svn.apache.org/r1447306
Log:
Add a test to verify that transactions commit send messages in the expected order.
Modified:
activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompParallelTest.scala
Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompParallelTest.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompParallelTest.scala?rev=1447306&r1=1447305&r2=1447306&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompParallelTest.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompParallelTest.scala Mon Feb 18 15:16:39 2013
@@ -1628,4 +1628,36 @@ class StompParallelTest extends StompTes
}
+ test("Transaction commit order") {
+ connect("1.1")
+ val dest = next_id("/queue/send_transaction-")
+
+ async_send(dest, "m1")
+
+ client.write(
+ "BEGIN\n" +
+ "transaction:x\n" +
+ "\n")
+
+ async_send(dest, "t1", "transaction:x\n")
+ async_send(dest, "m2")
+ async_send(dest, "t2", "transaction:x\n")
+
+ client.write(
+ "COMMIT\n" +
+ "transaction:x\n" +
+ "receipt:0\n"+
+ "\n")
+ wait_for_receipt("0")
+
+ async_send(dest, "m3")
+
+ subscribe("mysub",dest)
+
+ assert_received("m1")
+ assert_received("m2")
+ assert_received("t1")
+ assert_received("t2")
+ assert_received("m3")
+ }
}