1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-06-14 23:05:52 +00:00
parent c927991601
commit 03ced98dfe

View file

@ -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
}