You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/01/15 17:04:41 UTC

svn commit: r899676 - in /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources: TestPerUserPoolDataSource.java TestSharedPoolDataSource.java

Author: sebb
Date: Fri Jan 15 16:04:41 2010
New Revision: 899676

URL: http://svn.apache.org/viewvc?rev=899676&view=rev
Log:
Set maxWait for testMultipleThreads2() to 500ms (was 100ms)

Modified:
    commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestPerUserPoolDataSource.java
    commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestSharedPoolDataSource.java

Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestPerUserPoolDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestPerUserPoolDataSource.java?rev=899676&r1=899675&r2=899676&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestPerUserPoolDataSource.java (original)
+++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestPerUserPoolDataSource.java Fri Jan 15 16:04:41 2010
@@ -382,7 +382,10 @@
     }
 
     public void testMultipleThreads2() throws Exception {
-        multipleThreads(2 * (int)(getMaxWait()), true, true, getMaxWait());
+        final int defaultMaxWait = 500;
+        ((PerUserPoolDataSource) ds).setDefaultMaxWait(defaultMaxWait);
+        ((PerUserPoolDataSource) ds).setPerUserMaxWait("foo",new Integer(defaultMaxWait));
+        multipleThreads(2 * defaultMaxWait, true, true, defaultMaxWait);
     }
 
     public void testTransactionIsolationBehavior() throws Exception {

Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestSharedPoolDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestSharedPoolDataSource.java?rev=899676&r1=899675&r2=899676&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestSharedPoolDataSource.java (original)
+++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/datasources/TestSharedPoolDataSource.java Fri Jan 15 16:04:41 2010
@@ -372,7 +372,9 @@
     }
 
     public void testMultipleThreads2() throws Exception {
-        multipleThreads(3 * (int)(getMaxWait()), true, true, getMaxWait());
+        final int defaultMaxWait = 500;
+        ((SharedPoolDataSource) ds).setMaxWait(defaultMaxWait);
+        multipleThreads(2 * defaultMaxWait, true, true, defaultMaxWait);
     }
 
     public void testTransactionIsolationBehavior() throws Exception {