From eed430c4654f92681db07e9956c08798d2f47aa1 Mon Sep 17 00:00:00 2001 From: fhanik Date: Sat, 2 May 2009 04:35:22 +0000 Subject: [PATCH] Fix logger level to not show up by default Add fairness tests to all git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@770889 13f79535-47bb-0310-9956-ffa450edef68 --- .../tomcat/jdbc/test/CheckOutThreadTest.java | 69 ++++++++++++++++++++++ .../apache/tomcat/jdbc/test/DefaultTestCase.java | 1 + 2 files changed, 70 insertions(+) diff --git a/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java b/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java index 6e2aedf42..7196df95e 100644 --- a/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java +++ b/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java @@ -76,6 +76,27 @@ public class CheckOutThreadTest extends DefaultTestCase { tearDown(); } + public void testPoolThreads10Connections10Fair() throws Exception { + init(); + this.datasource.getPoolProperties().setMaxActive(10); + this.datasource.getPoolProperties().setFairQueue(true); + this.threadcount = 10; + this.transferProperties(); + this.datasource.getConnection().close(); + latch = new CountDownLatch(threadcount); + long start = System.currentTimeMillis(); + for (int i=0; i