commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1051273 - /commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java
Date Mon, 20 Dec 2010 20:16:24 GMT
Author: simonetripodi
Date: Mon Dec 20 20:16:23 2010
New Revision: 1051273

URL: http://svn.apache.org/viewvc?rev=1051273&view=rev
Log:
fixed IAE in broken tests

Modified:
    commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java?rev=1051273&r1=1051272&r2=1051273&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java
Mon Dec 20 20:16:23 2010
@@ -152,15 +152,16 @@ public class TestStackObjectPool extends
      
     @Test
     public void testVariousConstructors() throws Exception {
+        PoolableObjectFactory<Integer> factory = new SelectiveFactory();
         {
-            StackObjectPool<Integer> pool = new StackObjectPool<Integer>(null);
+            StackObjectPool<Integer> pool = new StackObjectPool<Integer>(factory);
             assertNotNull(pool);
         }
         {
             StackObjectPoolConfig config = new StackObjectPoolConfig.Builder()
                 .setMaxSleeping(10)
                 .createConfig();
-            StackObjectPool<Integer> pool = new StackObjectPool<Integer>(null,config);
+            StackObjectPool<Integer> pool = new StackObjectPool<Integer>(factory,config);
             assertNotNull(pool);
         }
         {
@@ -168,7 +169,7 @@ public class TestStackObjectPool extends
                 .setMaxSleeping(20)
                 .setInitIdleCapacity(5)
                 .createConfig();
-            StackObjectPool<Integer> pool = new StackObjectPool<Integer>(null,config);
+            StackObjectPool<Integer> pool = new StackObjectPool<Integer>(factory,config);
             assertNotNull(pool);
         }
     }



Mime
View raw message