commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1537343 - /commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
Date Wed, 30 Oct 2013 23:36:33 GMT
Author: sebb
Date: Wed Oct 30 23:36:32 2013
New Revision: 1537343

URL: http://svn.apache.org/r1537343
Log:
The setUp() method already creates these variables in the same way

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

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java?rev=1537343&r1=1537342&r2=1537343&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
Wed Oct 30 23:36:32 2013
@@ -83,7 +83,9 @@ public class TestGenericKeyedObjectPool 
         return String.valueOf(n);
     }
 
+    /** setUp(): {@code new GenericKeyedObjectPool<String,String>(factory)} */
     private GenericKeyedObjectPool<String,String> pool = null;
+    /** setUp(): {@code new SimpleFactory<String>()} */
     private SimpleFactory<String> factory = null;
     private static final Integer KEY_ZERO = Integer.valueOf(0);
     private static final Integer KEY_ONE = Integer.valueOf(1);
@@ -1102,9 +1104,6 @@ public class TestGenericKeyedObjectPool 
 
     @Test(timeout=60000)
     public void testExceptionOnPassivateDuringReturn() throws Exception {
-        SimpleFactory<String> factory = new SimpleFactory<String>();
-        GenericKeyedObjectPool<String,String> pool =
-                new GenericKeyedObjectPool<String,String>(factory);
         String obj = pool.borrowObject("one");
         factory.setThrowExceptionOnPassivate(true);
         pool.returnObject("one", obj);
@@ -1351,9 +1350,6 @@ public class TestGenericKeyedObjectPool 
      */
     @Test(timeout=60000)
     public void testClear() throws Exception {
-        SimpleFactory<String> factory = new SimpleFactory<String>();
-        GenericKeyedObjectPool<String,String> pool =
-                new GenericKeyedObjectPool<String,String>(factory);
         pool.setMaxTotal(2);
         pool.setMaxTotalPerKey(2);
         pool.setBlockWhenExhausted(false);
@@ -1380,9 +1376,6 @@ public class TestGenericKeyedObjectPool 
      */
     @Test(timeout=60000)
     public void testWhenExhaustedBlockClosePool() throws Exception {
-        SimpleFactory<String> factory = new SimpleFactory<String>();
-        GenericKeyedObjectPool<String,String> pool =
-                new GenericKeyedObjectPool<String,String>(factory);
         pool.setMaxTotalPerKey(1);
         pool.setBlockWhenExhausted(true);
         pool.setMaxWaitMillis(-1);



Mime
View raw message