commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r781225 - in /commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl: TestGenericKeyedObjectPool.java TestGenericObjectPool.java
Date Wed, 03 Jun 2009 00:38:15 GMT
Author: sebb
Date: Wed Jun  3 00:38:15 2009
New Revision: 781225

URL: http://svn.apache.org/viewvc?rev=781225&view=rev
Log:
Check numIdle == 0 after clearing the pool

Modified:
    commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java?rev=781225&r1=781224&r2=781225&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
Wed Jun  3 00:38:15 2009
@@ -92,6 +92,8 @@
 
     public void tearDown() throws Exception {
         super.tearDown();
+        pool.clear();
+        assertEquals("NumIdle should be zero after clearing the pool",0,pool.getNumIdle());
         pool.close();
         pool = null;
     }
@@ -901,6 +903,7 @@
             pool.setNumTestsPerEvictionRun(smallPrimes[i]);
             for (int j = 0; j < 5; j++) {// Try the tests a few times
                 pool.clear();
+                assertEquals("NumIdle should be zero after clearing the pool",0,pool.getNumIdle());
                 int zeroLength = 10 + random.nextInt(20);
                 for (int k = 0; k < zeroLength; k++) {
                     pool.addObject(zero);

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java?rev=781225&r1=781224&r2=781225&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
Wed Jun  3 00:38:15 2009
@@ -67,6 +67,8 @@
 
     public void tearDown() throws Exception {
         super.tearDown();
+        pool.clear();
+        assertEquals("NumIdle should be zero after clearing the pool",0,pool.getNumIdle());
         pool.close();
         pool = null;
     }



Mime
View raw message