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/13 18:41:35 UTC

svn commit: r898853 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java

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