mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 2 additions and 3 deletions
|
@ -68,9 +68,7 @@ if defined? GDBM
|
|||
begin
|
||||
FileUtils.remove_entry_secure @tmpdir
|
||||
rescue
|
||||
system("ls", "-lRa", @tmpdir)
|
||||
system("rmdir", @tmpdir)
|
||||
raise
|
||||
system("fuser", *Dir.entries(@tmpdir).grep(/\A(?!\.\.?\z)/), chdir: @chdir)
|
||||
else
|
||||
return
|
||||
end
|
||||
|
@ -595,6 +593,7 @@ if defined? GDBM
|
|||
|
||||
size2 = File.size(@path)
|
||||
@gdbm.reorganize
|
||||
@gdbm.sync
|
||||
size3 = File.size(@path)
|
||||
|
||||
# p [size1, size2, size3]
|
||||
|
|
Loading…
Add table
Reference in a new issue