ruby-changes:72961
From: Nobuyoshi <ko1@a...>
Date: Fri, 19 Aug 2022 00:17:05 +0900 (JST)
Subject: [ruby-changes:72961] 2652b0da6b (master): Harden SizedQueue#push timeout test
https://git.ruby-lang.org/ruby.git/commit/?id=2652b0da6b From 2652b0da6bc1463fc7968d71a6f8897459370514 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 19 Aug 2022 00:16:44 +0900 Subject: Harden SizedQueue#push timeout test --- test/ruby/test_thread_queue.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ruby/test_thread_queue.rb b/test/ruby/test_thread_queue.rb index bd5728389d..723450ad23 100644 --- a/test/ruby/test_thread_queue.rb +++ b/test/ruby/test_thread_queue.rb @@ -179,11 +179,11 @@ class TestThreadQueue < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread_queue.rb#L179 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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/