Adjust ActiveMQ settings in integration tests
Before this change tests on the CI server showed the following message: Store limit is 102400 mb, whilst the data directory: /opt/.../KahaDB only has 74810 mb of usable space This change turns off store persistence and also explicitly sets the limit on memory usage.
This commit is contained in:
@@ -25,6 +25,7 @@ import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.After;
|
||||
@@ -89,7 +90,9 @@ public class StompBrokerRelayMessageHandlerIntegrationTests {
|
||||
this.activeMQBroker = new BrokerService();
|
||||
this.activeMQBroker.addConnector("stomp://localhost:" + this.port);
|
||||
this.activeMQBroker.setStartAsync(false);
|
||||
this.activeMQBroker.setDeleteAllMessagesOnStartup(true);
|
||||
this.activeMQBroker.setPersistent(false);
|
||||
this.activeMQBroker.getSystemUsage().getMemoryUsage().setLimit(1024 * 1024 * 5);
|
||||
this.activeMQBroker.getSystemUsage().getTempUsage().setLimit(1024 * 1024 * 5);
|
||||
this.activeMQBroker.start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user