make test resiliant to message expiry before enqueue that can ocurr under load/slow machines

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@799538 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-07-31 08:03:41 +00:00
parent 39d6f49b26
commit e4b76014c6
1 changed files with 1 additions and 3 deletions

View File

@ -57,8 +57,6 @@ public class MessageExpirationReaperTest {
protected void createBroker() throws Exception { protected void createBroker() throws Exception {
broker = new BrokerService(); broker = new BrokerService();
// broker.setPersistent(false);
// broker.setUseJmx(true);
broker.setDeleteAllMessagesOnStartup(true); broker.setDeleteAllMessagesOnStartup(true);
broker.setBrokerName(brokerName); broker.setBrokerName(brokerName);
broker.addConnector(brokerUrl); broker.addConnector(brokerUrl);
@ -102,7 +100,7 @@ public class MessageExpirationReaperTest {
assertEquals("Incorrect inflight count: " + view.getInFlightCount(), 0, view.getInFlightCount()); assertEquals("Incorrect inflight count: " + view.getInFlightCount(), 0, view.getInFlightCount());
assertEquals("Incorrect queue size count", 0, view.getQueueSize()); assertEquals("Incorrect queue size count", 0, view.getQueueSize());
assertEquals("Incorrect expired size count", 3, view.getEnqueueCount()); assertEquals("Incorrect expired size count", view.getEnqueueCount(), view.getExpiredCount());
// Send more messages with an expiration // Send more messages with an expiration
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {