Author: sebb
Date: Mon Jan 4 23:41:48 2010
New Revision: 895827
URL: http://svn.apache.org/viewvc?rev=895827&view=rev
Log:
Cannot be sure that half the threads will fail, because the waiting threads
can get a connection during the shutdown sequence
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=895827&r1=895826&r2=895827&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
Mon Jan 4 23:41:48 2010
@@ -727,7 +727,9 @@
+ ". expectError: " + expectError
);
if (expectError) {
- assertEquals("Expected half the threads to
fail",pts.length/2,failed);
+ // Cannot be sure that half the threads will fail, because
the waiting threads
+ // can get a connection during the shutdown sequence
+ assertTrue("Expected some of the threads to fail",failed >
0);
} else {
assertEquals("Did not expect any threads to
fail",0,failed);
}