You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ke...@apache.org on 2014/01/03 15:16:20 UTC

git commit: Added timeout because of tests failing intermittently

Updated Branches:
  refs/heads/trunk 96bdda716 -> 6509b1f81


Added timeout because of tests failing intermittently


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/6509b1f8
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/6509b1f8
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/6509b1f8

Branch: refs/heads/trunk
Commit: 6509b1f8114e326293b76def73a66790bd4feb90
Parents: 96bdda7
Author: Kevin Earls <ke...@kevinearls.com>
Authored: Fri Jan 3 15:16:11 2014 +0100
Committer: Kevin Earls <ke...@kevinearls.com>
Committed: Fri Jan 3 15:16:11 2014 +0100

----------------------------------------------------------------------
 .../apache/activemq/broker/policy/DeadLetterTestSupport.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/6509b1f8/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java
----------------------------------------------------------------------
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 7b7aa7b..13be9dd 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());      
             }