summaryrefslogtreecommitdiff
path: root/test/test_pstore.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-07 01:23:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-07 01:23:07 +0000
commit298258891d2f8a80f8d1eac193c6609a256a3cf0 (patch)
tree0c7bac8b88d9d2b57e3aa9635f6839a8e97b1b35 /test/test_pstore.rb
parentb5ba059a0b21ba6a198d8dca864045c37ce3babb (diff)
use assert_equal, assert_match, and so on.
* test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on. * test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb, test/ruby/test_io_m17n.rb (assert_str_equal): ditto. * test/rubygems/test_gem_remote_fetcher.rb (assert_data_from_{server,proxy}): ditto. * test/test_pstore.rb (test_thread_safe): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_pstore.rb')
-rw-r--r--test/test_pstore.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_pstore.rb b/test/test_pstore.rb
index 8bb44e8..1b93925 100644
--- a/test/test_pstore.rb
+++ b/test/test_pstore.rb
@@ -84,10 +84,10 @@ class PStoreTest < Test::Unit::TestCase
sleep 1
end
end
- until flag; end
+ sleep 0.1 until flag
@pstore.transaction {}
end
- assert_block do
+ begin
pstore = PStore.new(second_file, true)
flag = false
Thread.new do
@@ -97,8 +97,8 @@ class PStoreTest < Test::Unit::TestCase
sleep 1
end
end
- until flag; end
- pstore.transaction { pstore[:foo] == "bar" }
+ sleep 0.1 until flag
+ assert_equal("bar", pstore.transaction { pstore[:foo] })
end
ensure
File.unlink(second_file) rescue nil