Skip to content

Commit

Permalink
Harden SizedQueue#push timeout test
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 18, 2022
1 parent 7c1ed47 commit 2652b0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/ruby/test_thread_queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def test_sized_queue_push_timeout
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
Expand Down

0 comments on commit 2652b0d

Please sign in to comment.