You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by mi...@apache.org on 2014/12/12 22:43:21 UTC

svn commit: r1645081 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/ClobReclamationTest.java

Author: mikem
Date: Fri Dec 12 21:43:21 2014
New Revision: 1645081

URL: http://svn.apache.org/r1645081
Log:
DERBY-6775 add to testBlobLinkedListReclamationOnRollback() test to check that free space is used on subsequent inserts

fix retry counter, it was being reset every time through loop.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/ClobReclamationTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/ClobReclamationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/ClobReclamationTest.java?rev=1645081&r1=1645080&r2=1645081&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/ClobReclamationTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/ClobReclamationTest.java Fri Dec 12 21:43:21 2014
@@ -125,6 +125,8 @@ public class ClobReclamationTest extends
         // at least one sleep/retry.
         int previous_alloc_count = Integer.MAX_VALUE;
 
+        int num_retries = 0;
+
         for(;;)
         {
             // loop until success, or until sleep/retry does not result
@@ -136,7 +138,6 @@ public class ClobReclamationTest extends
             rs.next();
 
             int num_allocated_pages = rs.getInt(1);
-            int num_retries = 0;
 
             // first check if count is the expected value, if so done.
             if (num_allocated_pages == expectedAlloc)
@@ -168,6 +169,7 @@ public class ClobReclamationTest extends
                         "Fail with retries -- num_allocated_pages:" + 
                         num_allocated_pages + 
                         " == expectedAlloc: " + expectedAlloc +
+                        " previous_alloc_count: " + previous_alloc_count +
                         " num_retries: " + num_retries, 
                         num_allocated_pages == expectedAlloc); 
                 }
@@ -182,6 +184,8 @@ public class ClobReclamationTest extends
                     " > expectedAlloc: " + expectedAlloc, 
                     num_allocated_pages == expectedAlloc); 
             }
+
+            rs.close();
         } 
     }