diff options
Diffstat (limited to 'test/tcl/test130.tcl')
| -rw-r--r-- | test/tcl/test130.tcl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/tcl/test130.tcl b/test/tcl/test130.tcl index 08985140..8a8e0cc2 100644 --- a/test/tcl/test130.tcl +++ b/test/tcl/test130.tcl @@ -1,6 +1,6 @@ # See the file LICENSE for redistribution information. # -# Copyright (c) 2010, 2012 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved. # # $Id$ # @@ -227,6 +227,7 @@ proc test130 { method {nentries 10000} {num_db 3} {tnum "130"} args } { } # Now compact for real. + set orig_size [file size $filename] if {[catch {eval {$db(0,$i) compact} \ $txn {-freespace}} ret] } { error "FAIL: db compact: $ret" @@ -243,6 +244,20 @@ proc test130 { method {nentries 10000} {num_db 3} {tnum "130"} args } { error_check_good db_sync [$db(0,$i) sync] 0 error_check_good verify_dir \ [verify_dir $testdir "" 0 0 $nodump ] 0 + # + # The compaction of subdb$i with i < (numdb - 1) is not + # expected to reduce the file size because the last + # page of the file is owned by subdb${num_db-1}. + # + set after_compact_size [file size $filename] + if { $i < [expr $num_db - 1] || + ($txnenv == 1 && $commit == 0) } { + error_check_good file_size \ + [expr $orig_size == $after_compact_size] 1 + } else { + error_check_good file_size \ + [expr $orig_size >= $after_compact_size] 1 + } } } |
