Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3E339DAD for ; Mon, 9 Apr 2012 19:58:40 +0000 (UTC) Received: (qmail 27544 invoked by uid 500); 9 Apr 2012 19:58:40 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 27522 invoked by uid 500); 9 Apr 2012 19:58:40 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 27514 invoked by uid 99); 9 Apr 2012 19:58:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2012 19:58:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2012 19:58:37 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4A533238897A for ; Mon, 9 Apr 2012 19:58:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1311402 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java Date: Mon, 09 Apr 2012 19:58:14 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120409195814.4A533238897A@eris.apache.org> Author: tabish Date: Mon Apr 9 19:58:13 2012 New Revision: 1311402 URL: http://svn.apache.org/viewvc?rev=1311402&view=rev Log: Test can hang if the async event isn't received, add a timeout in the test loop's wait call to prevent this. Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java?rev=1311402&r1=1311401&r2=1311402&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java (original) +++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java Mon Apr 9 19:58:13 2012 @@ -70,7 +70,7 @@ public class OnePrefetchAsyncConsumerTes long done = System.currentTimeMillis() + getMaxTestTime(); synchronized (testMutex) { while (!testMutex.testCompleted && System.currentTimeMillis() < done) { - testMutex.wait(); + testMutex.wait(TimeUnit.SECONDS.toMillis(5)); } }