commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r898853 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java
Date Wed, 13 Jan 2010 17:41:35 GMT
Author: sebb
Date: Wed Jan 13 17:41:34 2010
New Revision: 898853

URL: http://svn.apache.org/viewvc?rev=898853&view=rev
Log:
Create all the threads before starting them

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=898853&r1=898852&r2=898853&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 Wed
Jan 13 17:41:34 2010
@@ -715,8 +715,13 @@
                         }
                     }
                 };
+                // Create all the threads
                 for (int i = 0; i < pts.length; i++) {
-                    (pts[i] = new PoolTest(threadGroup, holdTime, expectError, loopOnce)).start();
   
+                    pts[i] = new PoolTest(threadGroup, holdTime, expectError, loopOnce);
   
+                }
+                // Start all the threads
+                for (int i = 0; i < pts.length; i++) {
+                    pts[i].start();    
                 }
 
                 // Give all threads a chance to start and succeed



Mime
View raw message