activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1447771 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompParallelTest.scala
Date Tue, 19 Feb 2013 15:52:15 GMT
Author: chirino
Date: Tue Feb 19 15:52:15 2013
New Revision: 1447771

URL: http://svn.apache.org/r1447771
Log:
Sending expired messages would generated a false warning.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompParallelTest.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala?rev=1447771&r1=1447770&r2=1447771&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
Tue Feb 19 15:52:15 2013
@@ -690,8 +690,9 @@ class Queue(val router: LocalRouter, val
           if( delivery.ack!=null ) {
             delivery.ack(if ( expired ) Expired else Undelivered, delivery.uow)
           }
-          if( delivery.uow!=null ) {
-            delivery.uow.release(binding.binding_kind+":"+id)
+          if( delivery.persistent && tune_persistent ) {
+            assert(delivery.uow!=null)
+            delivery.uow.release(binding.binding_kind+":"+id+":offer")
           }
           return true
         }

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=1447771&r1=1447770&r2=1447771&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
Tue Feb 19 15:52:15 2013
@@ -1663,4 +1663,24 @@ class StompParallelTest extends StompTes
       assert_received("m3",c=receiver)
     }
   }
+
+  for( kind <- Array("/queue/", "/topic/", "/topic/queued.")) {
+    test("Sending already expired message to "+kind) {
+
+      val dest = next_id(kind+"expired-")
+
+      val receiver = connect("1.1", new StompClient)
+      subscribe("mysub",dest,c=receiver)
+
+      connect("1.1")
+
+      async_send(dest, "m1", "persistent:true\n")
+      val exp = System.currentTimeMillis()-1000
+      async_send(dest, "e1", "persistent:true\nexpires:"+exp+"\n")
+      async_send(dest, "m2", "persistent:true\n")
+
+      assert_received("m1",c=receiver)
+      assert_received("m2",c=receiver)
+    }
+  }
 }



Mime
View raw message