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:
parent
c927991601
commit
03ced98dfe
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue