From 6509b1f8114e326293b76def73a66790bd4feb90 Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Fri, 3 Jan 2014 15:16:11 +0100 Subject: [PATCH] Added timeout because of tests failing intermittently --- .../activemq/broker/policy/DeadLetterTestSupport.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java index 7b7aa7b81e..13be9dda28 100755 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java @@ -194,11 +194,15 @@ public abstract class DeadLetterTestSupport extends TestSupport { } private void validateConsumerPrefetch(String destination, long expectedCount) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + } RegionBroker regionBroker = (RegionBroker) broker.getRegionBroker(); for (org.apache.activemq.broker.region.Destination dest : regionBroker.getQueueRegion().getDestinationMap().values()) { if (dest.getName().equals(destination)) { DestinationStatistics stats = dest.getDestinationStatistics(); - LOG.info("inflight for : " + dest.getName() + ": " + stats.getInflight().getCount()); + LOG.info(">>>> inflight for : " + dest.getName() + ": " + stats.getInflight().getCount()); assertEquals("inflight for: " + dest.getName() + ": " + stats.getInflight().getCount() + " matches", expectedCount, stats.getInflight().getCount()); }