activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1372496 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompMetricsTest.scala
Date Mon, 13 Aug 2012 16:32:02 GMT
Author: chirino
Date: Mon Aug 13 16:32:01 2012
New Revision: 1372496

URL: http://svn.apache.org/viewvc?rev=1372496&view=rev
Log:
Fixes APLO-240: Aggregate destination metrics invalid when using topic slow_consumer_policy="queue"

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

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala?rev=1372496&r1=1372495&r2=1372496&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala
Mon Aug 13 16:32:01 2012
@@ -1323,9 +1323,9 @@ class LocalRouter(val virtual_host:Virtu
 
         queue.binding.unbind(this, queue)
 
-        for ( aggreator <-queue.address match {
-          case d:DurableSubscriptionDestinationDTO => Some(virtual_host.dead_dsub_metrics)
-          case t:TopicDestinationDTO => None
+        for ( aggreator <- queue.binding match {
+          case d:DurableSubscriptionQueueBinding => Some(virtual_host.dead_dsub_metrics)
+          case t:TempQueueBinding => None
           case _ => Some(virtual_host.dead_queue_metrics)
         }) {
 

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompMetricsTest.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompMetricsTest.scala?rev=1372496&r1=1372495&r2=1372496&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompMetricsTest.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/test/StompMetricsTest.scala
Mon Aug 13 16:32:01 2012
@@ -158,9 +158,12 @@ class StompMetricsTest extends StompTest
   }
 
   test("Topic slow_consumer_policy='queue' Stats") {
-    connect("1.1")
+    // Also look at the aggregatee metrics..
+    val get_dest_metrics1 = get_dest_metrics
 
+    connect("1.1")
     sync_send("/topic/queued.stats", 1)
+
     val stat1 = topic_status("queued.stats")
     stat1.producers.size() should be(1)
     stat1.consumers.size() should be(0)
@@ -196,10 +199,17 @@ class StompMetricsTest extends StompTest
       stat3.metrics.enqueue_item_counter should be(3)
       stat3.metrics.dequeue_item_counter should be(2)
       stat3.metrics.queue_items should be(0)
+
+      val get_dest_metrics2 = get_dest_metrics
+
+      get_dest_metrics2.enqueue_item_counter should be( get_dest_metrics1.enqueue_item_counter+3
)
+      get_dest_metrics2.dequeue_item_counter should be( get_dest_metrics1.dequeue_item_counter+2
)
+      get_dest_metrics2.queue_items should be( get_dest_metrics1.queue_items )
     }
 
     unsubscribe("0")
     client.close()
+
     within(1, SECONDS) {
       val stat4 = topic_status("queued.stats")
       stat4.producers.size() should be(0)
@@ -208,6 +218,12 @@ class StompMetricsTest extends StompTest
       stat4.metrics.enqueue_item_counter should be(3)
       stat4.metrics.dequeue_item_counter should be(2)
       stat4.metrics.queue_items should be(0)
+
+      val get_dest_metrics2 = get_dest_metrics
+
+      get_dest_metrics2.enqueue_item_counter should be( get_dest_metrics1.enqueue_item_counter+3
)
+      get_dest_metrics2.dequeue_item_counter should be( get_dest_metrics1.dequeue_item_counter+2
)
+      get_dest_metrics2.queue_items should be( get_dest_metrics1.queue_items )
     }
   }
 



Mime
View raw message