diff --git a/test/test_integration_pending.rb b/test/test_integration_pending.rb index 8d83e958..4c2ac735 100644 --- a/test/test_integration_pending.rb +++ b/test/test_integration_pending.rb @@ -160,6 +160,7 @@ def test_busy_timeout sync.send_to_main :ready busy.lock end + sync.send_to_main :done ensure db2&.close end @@ -173,9 +174,10 @@ def test_busy_timeout end t1sync.send_to_thread :end - assert_operator(count, *test_case[:expected_count]) - busy.unlock + t2sync.wait_for_thread :done + + assert_operator(count, *test_case[:expected_count]) ensure active_thread&.join blocking_thread&.join