From 74148299dc95dc97600d58a997e121b859ce7fc6 Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Mon, 28 Sep 2009 10:37:57 +0000 Subject: [PATCH] https://issues.apache.org/activemq/browse/AMQ-2413 - prevent test failures on slow machines git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@819493 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/activemq/bugs/AMQ2413Test.java | 1 + 1 file changed, 1 insertion(+) diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java index 35cdc112b8..d32446f08c 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java @@ -183,6 +183,7 @@ public class AMQ2413Test extends CombinationTestSupport implements MessageListen try { while (count.get() < SEND_COUNT) { if (!receivedMessages.tryAcquire(HANG_THRESHOLD, TimeUnit.SECONDS)) { + if (count.get() == SEND_COUNT) break; throw new TimeoutException("Message not received for more than " + HANG_THRESHOLD + " seconds"); } }