Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 36166 invoked from network); 4 Jan 2010 23:42:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jan 2010 23:42:17 -0000 Received: (qmail 98694 invoked by uid 500); 4 Jan 2010 23:42:17 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 98585 invoked by uid 500); 4 Jan 2010 23:42:17 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 98573 invoked by uid 99); 4 Jan 2010 23:42:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 23:42:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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, 04 Jan 2010 23:42:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5AEBB23889FD; Mon, 4 Jan 2010 23:41:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r895827 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java Date: Mon, 04 Jan 2010 23:41:52 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100104234154.5AEBB23889FD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebb Date: Mon Jan 4 23:41:48 2010 New Revision: 895827 URL: http://svn.apache.org/viewvc?rev=895827&view=rev Log: Cannot be sure that half the threads will fail, because the waiting threads can get a connection during the shutdown sequence Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java?rev=895827&r1=895826&r2=895827&view=diff ============================================================================== --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java (original) +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java Mon Jan 4 23:41:48 2010 @@ -727,7 +727,9 @@ + ". expectError: " + expectError ); if (expectError) { - assertEquals("Expected half the threads to fail",pts.length/2,failed); + // Cannot be sure that half the threads will fail, because the waiting threads + // can get a connection during the shutdown sequence + assertTrue("Expected some of the threads to fail",failed > 0); } else { assertEquals("Did not expect any threads to fail",0,failed); }