aboutsummaryrefslogtreecommitdiffstats
path: root/test/gdbm
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-04 02:33:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-04 02:33:50 +0000
commit96831c00a3c561e99ef9578e2632b6f36b1b203f (patch)
treea1976fe2d23ea50e5697679fef87e883dd886b1f /test/gdbm
parentecbbd23646d2321e3e837aa7ac69582bbcd94190 (diff)
downloadruby-96831c00a3c561e99ef9578e2632b6f36b1b203f.tar.gz
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
Diffstat (limited to 'test/gdbm')
-rw-r--r--test/gdbm/test_gdbm.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/gdbm/test_gdbm.rb b/test/gdbm/test_gdbm.rb
index 46b921b562..c6c6c7318d 100644
--- a/test/gdbm/test_gdbm.rb
+++ b/test/gdbm/test_gdbm.rb
@@ -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]