From 4f0810acbf2509f142de1e12ef5ce4ea3ac8b602 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Wed, 7 Nov 2012 14:57:02 +0000 Subject: [PATCH] update: https://issues.apache.org/jira/browse/AMQ-4159 Don't wait forever for test to complete. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1406661 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/activemq/bugs/AMQ4159Test.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ4159Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ4159Test.java index 891d21822d..11118d43e4 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ4159Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ4159Test.java @@ -19,6 +19,7 @@ package org.apache.activemq.bugs; import java.net.URI; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import org.apache.activemq.JmsMultipleBrokersTestSupport; @@ -139,7 +140,7 @@ public class AMQ4159Test extends JmsMultipleBrokersTestSupport { // Wait for several attempts and verify that only a single thread was // used to (attempt) to establish the bridge. - attemptLatch.await(); + attemptLatch.await(4, TimeUnit.MINUTES); Assert.assertEquals(-1, concurrencyAttempt.get()); } }