test_gdbm.rb: sync after reorganize
* test/gdbm/test_gdbm.rb (test_reorganize): sync after reorganize to ensure that the db file get packed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ecbbd23646
commit
96831c00a3
@ -68,9 +68,7 @@ if defined? GDBM
|
|||||||
begin
|
begin
|
||||||
FileUtils.remove_entry_secure @tmpdir
|
FileUtils.remove_entry_secure @tmpdir
|
||||||
rescue
|
rescue
|
||||||
system("ls", "-lRa", @tmpdir)
|
system("fuser", *Dir.entries(@tmpdir).grep(/\A(?!\.\.?\z)/), chdir: @chdir)
|
||||||
system("rmdir", @tmpdir)
|
|
||||||
raise
|
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -595,6 +593,7 @@ if defined? GDBM
|
|||||||
|
|
||||||
size2 = File.size(@path)
|
size2 = File.size(@path)
|
||||||
@gdbm.reorganize
|
@gdbm.reorganize
|
||||||
|
@gdbm.sync
|
||||||
size3 = File.size(@path)
|
size3 = File.size(@path)
|
||||||
|
|
||||||
# p [size1, size2, size3]
|
# p [size1, size2, size3]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user