Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 71203 invoked from network); 1 Jun 2009 15:29:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Jun 2009 15:29:00 -0000 Received: (qmail 58235 invoked by uid 500); 1 Jun 2009 15:29:12 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 58139 invoked by uid 500); 1 Jun 2009 15:29:12 -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 58127 invoked by uid 99); 1 Jun 2009 15:29:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2009 15:29:12 +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, 01 Jun 2009 15:29:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 703C92388849; Mon, 1 Jun 2009 15:28:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r780683 - /commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java Date: Mon, 01 Jun 2009 15:27:46 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090601152841.703C92388849@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebb Date: Mon Jun 1 15:27:22 2009 New Revision: 780683 URL: http://svn.apache.org/viewvc?rev=780683&view=rev Log: Increase testEviction2 initial delay by 10% to reduce timing errors Capture and report visitCounts when "two" checks fail. Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java?rev=780683&r1=780682&r2=780683&view=diff ============================================================================== --- commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java (original) +++ commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java Mon Jun 1 15:27:22 2009 @@ -449,7 +449,7 @@ pool.returnObject("2",active2[i]); } - try { Thread.sleep(1000L); } catch(InterruptedException e) { } + try { Thread.sleep(1100L); } catch(InterruptedException e) { } assertTrue("Should be less than 1000 idle, found " + pool.getNumIdle(),pool.getNumIdle() < 1000); try { Thread.sleep(600L); } catch(InterruptedException e) { } assertTrue("Should be less than 900 idle, found " + pool.getNumIdle(),pool.getNumIdle() < 900); @@ -949,11 +949,17 @@ "totalInstances", totalInstances, zeroLength, oneLength, twoLength)); } } + int visits[] = new int[twoLength]; for (int k = 0; k < twoLength; k++) { tracker = (VisitTracker) pool.borrowObject(two); visitCount = tracker.getValidateCount(); + visits[k] = visitCount; if (visitCount < cycleCount || visitCount > cycleCount + 1){ - fail(formatSettings("TWO", "runs", runs, "lifo", lifo, "i", i, "j", j, + StringBuffer sb = new StringBuffer("Visits:"); + for (int l = 0; l <= k; l++){ + sb.append(visits[l]).append(' '); + } + fail(formatSettings("TWO "+sb.toString(), "runs", runs, "lifo", lifo, "i", i, "j", j, "k", k, "visitCount", visitCount, "cycleCount", cycleCount, "totalInstances", totalInstances, zeroLength, oneLength, twoLength)); }