From 73397c646e9a78cfee2116f7fc40f8e557def9ec Mon Sep 17 00:00:00 2001 From: Nate Berkopec Date: Sat, 14 Mar 2020 08:01:36 -0600 Subject: [PATCH] Fix test failure for JRuby --- test/test_thread_pool.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_thread_pool.rb b/test/test_thread_pool.rb index 18901d6a..db399d2b 100644 --- a/test/test_thread_pool.rb +++ b/test/test_thread_pool.rb @@ -78,7 +78,10 @@ class TestThreadPool < Minitest::Test end pool.trim - pool.instance_variable_get(:@workers).first.join + + # wait/join required here for MRI, JRuby slow enough to error here + worker = pool.instance_variable_get(:@workers).first + worker.join if worker assert_equal 0, pool.spawned end