commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r780484 - /commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
Date Sun, 31 May 2009 17:49:00 GMT
Author: sebb
Date: Sun May 31 17:48:59 2009
New Revision: 780484

URL: http://svn.apache.org/viewvc?rev=780484&view=rev
Log:
Add Lifo setting to captured variables

Modified:
    commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.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=780484&r1=780483&r2=780484&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
Sun May 31 17:48:59 2009
@@ -934,19 +934,19 @@
                 for (int k = 0; k < zeroLength; k++) {
                     tracker = (VisitTracker) pool.borrowObject(zero); 
                     visitCount = tracker.getValidateCount();                  
-                    assertTrue(formatSettings("i",i,"j",j,"k",k,"visitCount",visitCount,"cycleCount",cycleCount,"totalInstances",totalInstances,"zeroLength",zeroLength),
+                    assertTrue(formatSettings("lifo",lifo,"i",i,"j",j,"k",k,"visitCount",visitCount,"cycleCount",cycleCount,"totalInstances",totalInstances,"zeroLength",zeroLength),
                             visitCount >= cycleCount && visitCount <= cycleCount
+ 1);
                 }
                 for (int k = 0; k < oneLength; k++) {
                     tracker = (VisitTracker) pool.borrowObject(one); 
                     visitCount = tracker.getValidateCount();
-                    assertTrue(formatSettings("i",i,"j",j,"k",k,"visitCount",visitCount,"cycleCount",cycleCount,"totalInstances",totalInstances,"oneLength",oneLength),
+                    assertTrue(formatSettings("lifo",lifo,"i",i,"j",j,"k",k,"visitCount",visitCount,"cycleCount",cycleCount,"totalInstances",totalInstances,"oneLength",oneLength),
                             visitCount >= cycleCount && visitCount <= cycleCount
+ 1);
                 }
                 for (int k = 0; k < twoLength; k++) {
                     tracker = (VisitTracker) pool.borrowObject(two); 
                     visitCount = tracker.getValidateCount();
-                    assertTrue(formatSettings("i",i,"j",j,"k",k,"visitCount",visitCount,"cycleCount",cycleCount,"totalInstances",totalInstances,"twoLength",twoLength),
+                    assertTrue(formatSettings("lifo",lifo,"i",i,"j",j,"k",k,"visitCount",visitCount,"cycleCount",cycleCount,"totalInstances",totalInstances,"twoLength",twoLength),
                             visitCount >= cycleCount && visitCount <= cycleCount
+ 1);
                 }
             }
@@ -1478,9 +1478,10 @@
         return sw.toString();
     }
     
-    private String formatSettings(String s1, int i1, String s2, int i2, String s3, int i3,
+    private String formatSettings(String s0, boolean b0, String s1, int i1, String s2, int
i2, String s3, int i3,
             String s4, int i4, String s5, int i5, String s6, int i6, String s7, int i7){
         StringBuffer sb = new StringBuffer();
+        sb.append(s0).append('=').append(b0).append(' ');
         sb.append(s1).append('=').append(i1).append(' ');
         sb.append(s2).append('=').append(i2).append(' ');
         sb.append(s3).append('=').append(i3).append(' ');



Mime
View raw message