commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r606362 - /commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
Date Sat, 22 Dec 2007 00:43:32 GMT
Author: psteitz
Date: Fri Dec 21 16:43:31 2007
New Revision: 606362

URL: http://svn.apache.org/viewvc?rev=606362&view=rev
Log:
Changed to LIFO as default for base object pool tests.

Modified:
    commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java

Modified: commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java?rev=606362&r1=606361&r2=606362&view=diff
==============================================================================
--- commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
(original)
+++ commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
Fri Dec 21 16:43:31 2007
@@ -49,7 +49,6 @@
        GenericObjectPool pool = new GenericObjectPool(new SimpleFactory());
        pool.setMaxActive(mincap);
        pool.setMaxIdle(mincap);
-       pool.setLifo(false);
        return pool;
     }
 
@@ -73,7 +72,6 @@
     }
 
     public void testWhenExhaustedGrow() throws Exception {
-        GenericObjectPool pool = new GenericObjectPool(new SimpleFactory());
         pool.setMaxActive(1);
         pool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_GROW);
         Object obj1 = pool.borrowObject();
@@ -86,7 +84,6 @@
     }
 
     public void testWhenExhaustedFail() throws Exception {
-        GenericObjectPool pool = new GenericObjectPool(new SimpleFactory());
         pool.setMaxActive(1);
         pool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_FAIL);
         Object obj1 = pool.borrowObject();
@@ -102,7 +99,6 @@
     }
 
     public void testWhenExhaustedBlock() throws Exception {
-        GenericObjectPool pool = new GenericObjectPool(new SimpleFactory());
         pool.setMaxActive(1);
         pool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_BLOCK);
         pool.setMaxWait(10L);
@@ -119,7 +115,6 @@
     }
 
     public void testEvictWhileEmpty() throws Exception {
-        GenericObjectPool pool = new GenericObjectPool(new SimpleFactory(true,false));
         pool.evict();
         pool.evict();
         pool.close();
@@ -1074,7 +1069,7 @@
         op.close();
     }
     
-    private GenericObjectPool pool = null;
+    protected GenericObjectPool pool = null;
 
     private void assertConfiguration(GenericObjectPool.Config expected, GenericObjectPool
actual) throws Exception {
         assertEquals("testOnBorrow",expected.testOnBorrow,actual.getTestOnBorrow());
@@ -1191,12 +1186,11 @@
         }
     }
     protected boolean isLifo() {
- 
-        return false;
+        return true;
     }
 
     protected boolean isFifo() {
-        return true;
+        return false;
     }
 }
 



Mime
View raw message