mirror of https://github.com/apache/activemq.git
Apply patch for https://issues.apache.org/activemq/browse/AMQ-1858
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@685832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46b01cc862
commit
0cf384549c
|
@ -708,8 +708,8 @@ public class BrokerService implements Service {
|
||||||
if (systemUsage == null) {
|
if (systemUsage == null) {
|
||||||
systemUsage = new SystemUsage("Main", getPersistenceAdapter(), getTempDataStore());
|
systemUsage = new SystemUsage("Main", getPersistenceAdapter(), getTempDataStore());
|
||||||
systemUsage.getMemoryUsage().setLimit(1024 * 1024 * 64); // Default 64 Meg
|
systemUsage.getMemoryUsage().setLimit(1024 * 1024 * 64); // Default 64 Meg
|
||||||
systemUsage.getTempUsage().setLimit(1024 * 1024 * 1024 * 100); // 10 Gb
|
systemUsage.getTempUsage().setLimit(1024L * 1024 * 1024 * 100); // 10 Gb
|
||||||
systemUsage.getStoreUsage().setLimit(1024 * 1024 * 1024 * 100); // 100 GB
|
systemUsage.getStoreUsage().setLimit(1024L * 1024 * 1024 * 100); // 100 GB
|
||||||
addService(this.systemUsage);
|
addService(this.systemUsage);
|
||||||
}
|
}
|
||||||
return systemUsage;
|
return systemUsage;
|
||||||
|
|
|
@ -73,4 +73,12 @@ public class BrokerServiceTest extends TestCase {
|
||||||
connector.stop();
|
connector.stop();
|
||||||
service.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 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue