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 2005/05/12 17:20:02 UTC

svn commit: r169832 - /incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineCompressTest.java

Author: mikem
Date: Thu May 12 08:20:00 2005
New Revision: 169832

URL: http://svn.apache.org/viewcvs?rev=169832&view=rev
Log:
fix to one of the test cases, allocation count was off - new "before"
count had to be called after insert/delete calls.


Modified:
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineCompressTest.java

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineCompressTest.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineCompressTest.java?rev=169832&r1=169831&r2=169832&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineCompressTest.java (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineCompressTest.java Thu May 12 08:20:00 2005
@@ -519,6 +519,7 @@
         // lock timeout.
 
 
+        ret_before = getSpaceInfo(conn, "APP", table_name, false);
         callCompress(conn, "APP", table_name, false, false, true, false);
         ret_after  = getSpaceInfo(conn, "APP", table_name, false);
 
@@ -526,19 +527,20 @@
         if (ret_after[SPACE_INFO_NUM_ALLOC] != ret_before[SPACE_INFO_NUM_ALLOC])
         {
             log_wrong_count(
-                "Expected no alloc page change(3).", 
+                "Expected no alloc page change(4).", 
                 table_name, num_rows, 
                 ret_before[SPACE_INFO_NUM_ALLOC], 
                 ret_after[SPACE_INFO_NUM_ALLOC],
                 ret_before, ret_after);
         }
 
-        // expect no change in the number of free pages, if there are there
-        // is a problem with purge locking recognizing committed deleted rows.
-        if (ret_after[SPACE_INFO_NUM_FREE] != ret_before[SPACE_INFO_NUM_FREE])
+        // The only space that truncate only pass can free are free pages 
+        // located at end of file, so after free space can be anywhere from 
+        // what it was before to 0 pages.
+        if (ret_after[SPACE_INFO_NUM_FREE] > ret_before[SPACE_INFO_NUM_FREE])
         {
             log_wrong_count(
-                "Expected no free page change(3).", 
+                "Expected no increase in free pages(4).", 
                 table_name, num_rows, 
                 ret_before[SPACE_INFO_NUM_FREE], 
                 ret_after[SPACE_INFO_NUM_FREE],