зеркало из https://github.com/github/ruby.git
* test/test_timeout.rb (test_timeout): inverted test condition.
[Bug #8523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
dbd239a7aa
Коммит
563ee01100
|
@ -1,3 +1,8 @@
|
|||
Tue May 27 16:58:12 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* test/test_timeout.rb (test_timeout): inverted test condition.
|
||||
[Bug #8523]
|
||||
|
||||
Tue May 27 12:24:22 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/lib/minitest/unit.rb: Show leaked file descriptors.
|
||||
|
|
|
@ -13,15 +13,15 @@ class TestTimeout < Test::Unit::TestCase
|
|||
def test_timeout
|
||||
flag = true
|
||||
Thread.start {
|
||||
sleep 0.01
|
||||
sleep 1
|
||||
flag = false
|
||||
}
|
||||
assert_nothing_raised("[ruby-dev:38319]") do
|
||||
Timeout.timeout(1) {
|
||||
assert_raise(Timeout::Error, "[ruby-dev:38319]") do
|
||||
Timeout.timeout(0.1) {
|
||||
Thread.pass while flag
|
||||
}
|
||||
end
|
||||
assert !flag, "[ruby-dev:38319]"
|
||||
assert flag, "[ruby-dev:38319]"
|
||||
end
|
||||
|
||||
def test_cannot_convert_into_time_interval
|
||||
|
|
Загрузка…
Ссылка в новой задаче