mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Harden SizedQueue#push timeout test
This commit is contained in:
parent
7c1ed47097
commit
2652b0da6b
1 changed files with 3 additions and 3 deletions
|
@ -179,11 +179,11 @@ class TestThreadQueue < Test::Unit::TestCase
|
|||
assert_nil t1.value
|
||||
|
||||
t2 = Thread.new { q.push(2, timeout: 0.1) }
|
||||
assert_equal t2, t2.join(0.2)
|
||||
assert_equal t2, t2.join(1)
|
||||
assert_nil t2.value
|
||||
ensure
|
||||
t1&.kill
|
||||
t2&.kill
|
||||
t1&.kill&.join
|
||||
t2&.kill&.join
|
||||
end
|
||||
|
||||
def test_sized_queue_push_interrupt
|
||||
|
|
Loading…
Add table
Reference in a new issue