From 3465e3214238b77d3387b69c5802db088da88c02 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 25 Apr 2024 21:53:29 -0400 Subject: [PATCH] test: try to make sure we avoid deadlock on macos/windows in CI --- test/test_integration_pending.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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