Harden SizedQueue#push timeout test
This commit is contained in:
parent
7c1ed47097
commit
2652b0da6b
@ -179,11 +179,11 @@ class TestThreadQueue < Test::Unit::TestCase
|
|||||||
assert_nil t1.value
|
assert_nil t1.value
|
||||||
|
|
||||||
t2 = Thread.new { q.push(2, timeout: 0.1) }
|
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
|
assert_nil t2.value
|
||||||
ensure
|
ensure
|
||||||
t1&.kill
|
t1&.kill&.join
|
||||||
t2&.kill
|
t2&.kill&.join
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sized_queue_push_interrupt
|
def test_sized_queue_push_interrupt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user