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
This commit is contained in:
Timothy A. Bish 2012-11-07 14:57:02 +00:00
parent 8b84374cdb
commit 4f0810acbf
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ package org.apache.activemq.bugs;
import java.net.URI; import java.net.URI;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import org.apache.activemq.JmsMultipleBrokersTestSupport; 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 // Wait for several attempts and verify that only a single thread was
// used to (attempt) to establish the bridge. // used to (attempt) to establish the bridge.
attemptLatch.await(); attemptLatch.await(4, TimeUnit.MINUTES);
Assert.assertEquals(-1, concurrencyAttempt.get()); Assert.assertEquals(-1, concurrencyAttempt.get());
} }
} }