summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-14 23:05:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-14 23:05:52 +0000
commit03ced98dfecbdce5c651aa57047ebe178554b115 (patch)
treefd97e3e522e24ca71b13a83503bef6baf9d2bf88
parentc927991601799c5922b342ab4d5339d1a7186ff1 (diff)
test_require.rb: wait loadig
* test/ruby/test_require.rb (test_loading_fifo_threading): wait until the main thread blocks by loading. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_require.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 8ccc3a48f1b..e7a903d6585 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -701,7 +701,7 @@ class TestRequire < Test::Unit::TestCase
File.mkfifo(f.path)
assert_separately(["-", f.path], <<-END, timeout: 3)
th = Thread.current
- Thread.start {0.1; th.raise(IOError)}
+ Thread.start {begin sleep(0.001) end until th.stop?; th.raise(IOError)}
assert_raise(IOError) {load(ARGV[0])}
END
}