commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r897731 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java
Date Sun, 10 Jan 2010 23:26:03 GMT
Author: sebb
Date: Sun Jan 10 23:26:03 2010
New Revision: 897731

URL: http://svn.apache.org/viewvc?rev=897731&view=rev
Log:
Move assertion so debug happens for case where all threads complete

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=897731&r1=897730&r2=897731&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 Sun
Jan 10 23:26:03 2010
@@ -759,8 +759,6 @@
                         + ". expectError: " + expectError
                         );
                 if (expectError) {
-                    // Perform initial sanity check:
-                    assertTrue("Expected some of the threads to fail",failed > 0);
 // DBCP-318 is now fixed, so disable extra debug
                     if (pts.length/2 != failed){
                         for (int i = 0; i < pts.length; i++) {
@@ -779,6 +777,8 @@
                     if (didNotRun > 0){
                         System.out.println("NOTE: some threads did not run the code: "+didNotRun);
                     }
+                    // Perform initial sanity check:
+                    assertTrue("Expected some of the threads to fail",failed > 0);
                     // Assume that threads that did not run would have timed out.
                     assertEquals("WARNING: Expected half the threads to fail",pts.length/2,failed+didNotRun);
                 } else {



Mime
View raw message