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 2012/02/09 01:19:28 UTC
svn commit: r1242191 - in /activemq/activemq-apollo/trunk:
apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Topic.scala
apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
Author: chirino
Date: Thu Feb 9 00:19:27 2012
New Revision: 1242191
URL: http://svn.apache.org/viewvc?rev=1242191&view=rev
Log:
Fixes APLO-153 : New topic displays bad stats: enqueued: ... 42 years ... ago
Modified:
activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Topic.scala
activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Topic.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Topic.scala?rev=1242191&r1=1242190&r2=1242191&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Topic.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Topic.scala Thu Feb 9 00:19:27 2012
@@ -35,6 +35,8 @@ import security.SecuredResource
class Topic(val router:LocalRouter, val address:DestinationAddress, var config_updater: ()=>TopicDTO) extends DomainDestination with SecuredResource {
val topic_metrics = new DestMetricsDTO
+ topic_metrics.enqueue_ts = now
+ topic_metrics.dequeue_ts = now
val resource_kind =SecuredResource.TopicKind
var proxy_sessions = new HashSet[DeliverySession]()
Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala?rev=1242191&r1=1242190&r2=1242191&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala Thu Feb 9 00:19:27 2012
@@ -214,6 +214,15 @@ class StompTestSupport extends FunSuiteS
*/
class StompMetricsTest extends StompTestSupport {
+ test("New Topic Stats") {
+ connect("1.1")
+ subscribe("0", "/topic/newstats");
+ val stats = topic_status("newstats")
+ var now = System.currentTimeMillis()
+ (now-stats.metrics.enqueue_ts) should ( be < 10*1000L)
+ (now-stats.metrics.dequeue_ts) should ( be < 10*1000L)
+ }
+
test("Topic Stats") {
connect("1.1")