ruby-changes:40359
From: nobu <ko1@a...>
Date: Wed, 4 Nov 2015 11:33:57 +0900 (JST)
Subject: [ruby-changes:40359] nobu:r52440 (trunk): test_gdbm.rb: sync after reorganize
nobu 2015-11-04 11:33:50 +0900 (Wed, 04 Nov 2015) New Revision: 52440 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52440 Log: test_gdbm.rb: sync after reorganize * test/gdbm/test_gdbm.rb (test_reorganize): sync after reorganize to ensure that the db file get packed. Modified files: trunk/test/gdbm/test_gdbm.rb Index: test/gdbm/test_gdbm.rb =================================================================== --- test/gdbm/test_gdbm.rb (revision 52439) +++ test/gdbm/test_gdbm.rb (revision 52440) @@ -68,9 +68,7 @@ if defined? GDBM https://github.com/ruby/ruby/blob/trunk/test/gdbm/test_gdbm.rb#L68 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 https://github.com/ruby/ruby/blob/trunk/test/gdbm/test_gdbm.rb#L593 size2 = File.size(@path) @gdbm.reorganize + @gdbm.sync size3 = File.size(@path) # p [size1, size2, size3] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/