activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r818541 - /activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java
Date Thu, 24 Sep 2009 16:34:56 GMT
Author: dejanb
Date: Thu Sep 24 16:34:56 2009
New Revision: 818541

URL: http://svn.apache.org/viewvc?rev=818541&view=rev
Log:
merging http://fisheye6.atlassian.com/changelog/activemq/trunk?cs=818013

Modified:
    activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java

Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java?rev=818541&r1=818540&r2=818541&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java
Thu Sep 24 16:34:56 2009
@@ -90,7 +90,8 @@
         systemUsage.getMemoryUsage().setLimit(systemLimit);
         
         PolicyEntry policy = new PolicyEntry();
-        policy.setMemoryLimit(memoryLimit);
+        policy.setProducerFlowControl(true);
+        policy.setUseCache(true);
         PolicyMap pMap = new PolicyMap();
         pMap.setDefaultEntry(policy);
         broker.setDestinationPolicy(pMap);
@@ -112,13 +113,15 @@
         start();
         MessageProducer producer = session.createProducer(queue);
         producer.setDeliveryMode(deliveryMode);
+        int i =0;
         try {
-            for (int i = 0; i < 200; i++) {
+            for (i = 0; i < 200; i++) {
                 TextMessage message = session.createTextMessage(createMessageText(i));
                 producer.send(message);
             }
         } catch (javax.jms.ResourceAllocationException e) {
-            fail(e.getMessage() + ". percentUsage = " + broker.getSystemUsage().getMemoryUsage().getPercentUsage());
+        	e.printStackTrace();
+            fail(e.getMessage() + " num msgs = " + i + ". percentUsage = " + broker.getSystemUsage().getMemoryUsage().getPercentUsage());
         }
         stop();
     }
@@ -130,8 +133,8 @@
     }
     
     public void testUseCachePersistent() throws Exception {
-        int limit = memoryLimit / 3;
-        configureBroker(limit, limit);
+        int limit = memoryLimit / 2;
+        configureBroker(limit, memoryLimit);
         sendMessages(DeliveryMode.PERSISTENT);
     }
     



Mime
View raw message