commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1544941 - /commons/proper/pool/branches/1_5_RELEASE/src/test/org/apache/commons/pool/impl/TestGenericObjectPoolFactory.java
Date Sun, 24 Nov 2013 08:38:10 GMT
Author: psteitz
Date: Sun Nov 24 08:38:09 2013
New Revision: 1544941

URL: http://svn.apache.org/r1544941
Log:
Fixed broken test due to behavior change partially backported (minIdle > maxIdle ignored).

Modified:
    commons/proper/pool/branches/1_5_RELEASE/src/test/org/apache/commons/pool/impl/TestGenericObjectPoolFactory.java

Modified: commons/proper/pool/branches/1_5_RELEASE/src/test/org/apache/commons/pool/impl/TestGenericObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/1_5_RELEASE/src/test/org/apache/commons/pool/impl/TestGenericObjectPoolFactory.java?rev=1544941&r1=1544940&r2=1544941&view=diff
==============================================================================
--- commons/proper/pool/branches/1_5_RELEASE/src/test/org/apache/commons/pool/impl/TestGenericObjectPoolFactory.java
(original)
+++ commons/proper/pool/branches/1_5_RELEASE/src/test/org/apache/commons/pool/impl/TestGenericObjectPoolFactory.java
Sun Nov 24 08:38:09 2013
@@ -46,7 +46,7 @@ public class TestGenericObjectPoolFactor
 
         final GenericObjectPool.Config config = new GenericObjectPool.Config();
         config.maxActive = 1;
-        config.maxIdle = 2;
+        config.maxIdle = 12;
         config.maxWait = 3;
         config.minIdle = 4;
         config.minEvictableIdleTimeMillis = 5;
@@ -61,7 +61,7 @@ public class TestGenericObjectPoolFactor
         factory = new GenericObjectPoolFactory(new MethodCallPoolableObjectFactory(), config);
         pool = (GenericObjectPool)factory.createPool();
         assertEquals(1, pool.getMaxActive());
-        assertEquals(2, pool.getMaxIdle());
+        assertEquals(12, pool.getMaxIdle());
         assertEquals(3, pool.getMaxWait());
         assertEquals(4, pool.getMinIdle());
         assertEquals(5, pool.getMinEvictableIdleTimeMillis());
@@ -151,11 +151,11 @@ public class TestGenericObjectPoolFactor
         pool.close();
 
 
-        factory = new GenericObjectPoolFactory(new MethodCallPoolableObjectFactory(), 1,
GenericObjectPool.WHEN_EXHAUSTED_GROW, 2, 3, 4, true, false, 5, 6, 7, true);
+        factory = new GenericObjectPoolFactory(new MethodCallPoolableObjectFactory(), 1,
GenericObjectPool.WHEN_EXHAUSTED_GROW, 2, 13, 4, true, false, 5, 6, 7, true);
         pool = (GenericObjectPool)factory.createPool();
         assertEquals(1, pool.getMaxActive());
         assertEquals(2, pool.getMaxWait());
-        assertEquals(3, pool.getMaxIdle());
+        assertEquals(13, pool.getMaxIdle());
         assertEquals(4, pool.getMinIdle());
         assertEquals(5, pool.getTimeBetweenEvictionRunsMillis());
         assertEquals(6, pool.getNumTestsPerEvictionRun());
@@ -168,11 +168,11 @@ public class TestGenericObjectPoolFactor
         pool.close();
 
 
-        factory = new GenericObjectPoolFactory(new MethodCallPoolableObjectFactory(), 1,
GenericObjectPool.WHEN_EXHAUSTED_GROW, 2, 3, 4, true, false, 5, 6, 7, true, 8, false);
+        factory = new GenericObjectPoolFactory(new MethodCallPoolableObjectFactory(), 1,
GenericObjectPool.WHEN_EXHAUSTED_GROW, 2, 13, 4, true, false, 5, 6, 7, true, 8, false);
         pool = (GenericObjectPool)factory.createPool();
         assertEquals(1, pool.getMaxActive());
         assertEquals(2, pool.getMaxWait());
-        assertEquals(3, pool.getMaxIdle());
+        assertEquals(13, pool.getMaxIdle());
         assertEquals(4, pool.getMinIdle());
         assertEquals(5, pool.getTimeBetweenEvictionRunsMillis());
         assertEquals(6, pool.getNumTestsPerEvictionRun());



Mime
View raw message