activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r685832 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/broker/BrokerService.java test/java/org/apache/activemq/broker/BrokerServiceTest.java
Date Thu, 14 Aug 2008 09:32:26 GMT
Author: rajdavies
Date: Thu Aug 14 02:32:25 2008
New Revision: 685832

URL: http://svn.apache.org/viewvc?rev=685832&view=rev
Log:
Apply patch for https://issues.apache.org/activemq/browse/AMQ-1858

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=685832&r1=685831&r2=685832&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Thu Aug 14 02:32:25 2008
@@ -708,8 +708,8 @@
             if (systemUsage == null) {
                 systemUsage = new SystemUsage("Main", getPersistenceAdapter(), getTempDataStore());
                 systemUsage.getMemoryUsage().setLimit(1024 * 1024 * 64); // Default 64 Meg
-                systemUsage.getTempUsage().setLimit(1024 * 1024 * 1024 * 100); // 10 Gb
-                systemUsage.getStoreUsage().setLimit(1024 * 1024 * 1024 * 100); // 100 GB
+                systemUsage.getTempUsage().setLimit(1024L * 1024 * 1024 * 100); // 10 Gb
+                systemUsage.getStoreUsage().setLimit(1024L * 1024 * 1024 * 100); // 100 GB
                 addService(this.systemUsage);
             }
             return systemUsage;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java?rev=685832&r1=685831&r2=685832&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java
Thu Aug 14 02:32:25 2008
@@ -73,4 +73,12 @@
         connector.stop();
         service.stop();
     }
+    
+    public void testSystemUsage()
+    {
+        BrokerService service = new BrokerService();
+        assertEquals( service.getSystemUsage().getMemoryUsage().getLimit(), 1024 * 1024 *
64 );
+        assertEquals( service.getSystemUsage().getTempUsage().getLimit(), 1024L * 1024 *
1024 * 100 );
+        assertEquals( service.getSystemUsage().getStoreUsage().getLimit(), 1024L * 1024 *
1024 * 100 );
+    }
 }



Mime
View raw message